您可以輸出一個表的各種屬性與此代碼(抱歉,這是在VB中,這就是我要使用此項目):
私人小組logLogOnInfo(表如表) log.DebugFormat( 「LogOnInfo.ConnectionInfo for {0}:」,table.Name) Dim ci As ConnectionInfo = table.LogOnInfo.ConnectionInfo log.Debug(String.Format(「AllowCustomConnection:{0},DBName:{1},IntegratedSecurity: {2}「,ci.AllowCustomConnection,ci.DatabaseName,ci.IntegratedSecurity)) log.Debug(String.Format(」ServerName:{0},User:{2},Password:{1},Attributes: ci.ServerName,ci.Password,ci.UserID))
For Each a As NameValuePair2 In ci.Attributes.Collection
If a.Name = "QE_LogonProperties" Then
Dim attributes As DbConnectionAttributes = a.Value
For Each b As NameValuePair2 In attributes.Collection
log.DebugFormat(" {0}: {1}", b.Name, b.Value)
Next
Else
log.DebugFormat(" {0}: {1}", a.Name, a.Value)
End If
Next
末次
就像只是一次或編程?如果它只是一次,我建議你將sql分析器附加到問題的數據庫,調用報告,看看它做了什麼。 – 2010-03-25 17:41:05
以編程方式。實際上我們有幾百個報表,但有些用戶希望直接運行存儲過程,並將結果導出到CSV文件。這適用於幾乎所有的報告,因爲我們對存儲過程有一個標準的命名實踐,但有一些奇怪的情況。我寧願將它從報告中提取出來,放到數據庫的某個地方,而不必保留一份清單。 – Brandon 2010-03-25 18:06:43