2011-07-11 90 views
1

我有具有兩個數據連接InfoPath表單:我們可以在udcx文件中包含where子句嗎?

  1. 連接到SharePoint列表
  2. 連接到UDCX文件,其連接到一個SQL數據庫,並執行一個圖。該文件位於「數據連接庫」中。

查詢是這樣的

select "Ultipro id" as "Ultipro_id","Employee E" as "Employee_E","Anapharm id" as "Anapharm_id","First Name" as "First_Name","Last Name" as "Last_Name","User Name" as "User_Name","Company","CmpCompanyCode","EE Home Country" as "EE_Home_Country","Department Name" as "Department_Name","Department Code" as "Department_Code","Reporting Location" as "Reporting_Location","Rpt Location Code" as "Rpt_Location_Code","EecJobTitle","EecSupervisorID","1st Lvl Supervisor" as "_1st_Lvl_Supervisor","Executive Dept Head" as "Executive_Dept_Head","HR Rep" as "HR_Rep","EecEEtype","2nd Level Supv" as "_2nd_Level_Supv" from "dbo"."EmpDetail" as "EmpDetail" 

視圖返回的2195列,並在將來這個數字會增加。

有沒有辦法在此查詢中包含where子句? Where子句應在[用戶名]列中過濾。在我的InfoPath表單中,我有一個應該成爲where子句參數的人員選擇器。

有沒有一種方法來包含一個where子句沒有自定義編碼?

回答

0

恐怕這是不可能的......我建議編寫一個WebService,而不是通過udxc文件使用與SQL Server的直接連接。

您可以創建一個操作,將UserName作爲參數,根據它查詢數據庫並返回結果集。

相關問題