您可以输出一个表的各种属性与此代码(抱歉,这是在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