SQL Server数据库中数据绑定到InfoPath的RepeatingTable中。一般是直接连接数据库,管理DataSource。前提设置如图:SQL Server数据库中数据绑定到InfoPath的RepeatingTable中(一)

代码如下:

代码
private void QueryHistory(int progressID)
{
AdoQueryConnection myAdoQueryConnection
= (AdoQueryConnection)(this.DataConnections["ApproveHistory"]);
string sqlWhere = "progress=" + progressID;
myAdoQueryConnection.Command
= string.Format("select * from ApproveHistory where {0}", sqlWhere);
myAdoQueryConnection.Execute();
}

  但是这样的链接查询,上传到SharePoint之后,会有冲突。

这样可以用普通的数据库链接方式。代码如下:

见:SQL Server数据库中数据绑定到InfoPath的RepeatingTable中(二)

 

 

相关文章:

  • 2022-12-23
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-18
  • 2021-11-19
  • 2022-12-23
  • 2022-01-16
  • 2022-02-25
相关资源
相似解决方案