2013-10-09 38 views
0

我想知道是否有一種方法可以在c#中使用cfprocresult作爲數據集。我有返回兩個表的SP,我想把這些表放在cfprocresult中。這是可能的,以及如何?例如:ColdFusion和cfprocresult數據集

<cfprocresult name="qResult"> 

,現在我想這樣做

qResult.Table1 
    qResult.Table2 

或類似的東西。

回答

2

你的問題沒有多大意義。 C#與在ColdFusion中調用procs有什麼關係?

忽略C#參考,<cfprocresult>需要resultset屬性指定哪個結果集從PROC返回值變爲在其中變量,例如:

<cfprocresult resultset="1" name="table1"> 
<cfprocresult resultset="2" name="table2"> 

<cfprocresult>該文檔解釋這一切。在問一個關於代碼如何工作的問題之前,最好總是使用RTFM。

+0

我提到c#和數據集只是爲了更容易理解我的問題。我是Coldfusion的新手,但是我有c#的經驗,所以我用它來解釋我想要在CF中完成的任務。 – user1797770

2

您需要爲返回中的每個表執行cfprocresult。那些成爲他們自己的查詢對象,可以單獨處理。

<cfprocresult name = "result1" resultSet = "1"> 
<cfprocresult name = "result2" resultSet = "2">