水晶报表 Logon failed.Unable to connect:incorrect log on parameters

lfzwenzhu 2009-12-02 12:15:36
这是我对于report 的setLocation进行修改的代码, 但是总是提示错误信息:
Error Type:
RptControllers.dll (0x8004100F)
Logon failed. Error in File C:\WINNT\TEMP\ {FCF0DCE3-2CE7-4CE8-B880-C22B3E29A0C5}.rpt: Unable to connect: incorrect log on parameters.
希望有知道错误原因地,给个回复。谢谢

For Each crTable In clientDoc.Database.Tables
Set table_new = crTable.Clone
Set pb = table_new.ConnectionInfo.Attributes

pb.Item("Database DLL") = "crdb_ado.dll"
pb.Item("QE_DatabaseName") = strDbName
pb.Item("QE_DatabaseType") = "OLE DB (ADO)"
pb.Item("QE_ServerDescription") = strDbServer
pb.Item("QE_SQLDB") = True
pb.Item("SSO Enabled") = False

pb.Item("QE_LogonProperties").RemoveAll()
pb.Item("QE_LogonProperties").Add "Auto Translate","-1"
pb.Item("QE_LogonProperties").Add "Connect Timeout","15"
pb.Item("QE_LogonProperties").Add "Data Source",strDbServer
pb.Item("QE_LogonProperties").Add "General Timeout","0"
pb.Item("QE_LogonProperties").Add "Initial Catalog",strDbName
pb.Item("QE_LogonProperties").Add "Integrated Security","False"
pb.Item("QE_LogonProperties").Add "Locale Identifier","1033"
pb.Item("QE_LogonProperties").Add "OLE DB Services","-5"
pb.Item("QE_LogonProperties").Add "Provider","SQLOLEDB"
pb.Item("QE_LogonProperties").Add "Tag with columb collation when possible","0"
pb.Item("QE_LogonProperties").Add "Use DSN Default Properties",False
pb.Item("QE_LogonProperties").Add "Use Encryption for Data","0"

table_new.QualifiedName = strDbName & ".dbo." & crTable.Name
table_new.ConnectionInfo.UserName = strDbUser
table_new.ConnectionInfo.Password = strDbPassword

clientDoc.DatabaseController.setTableLocation crTable, table_new
Set table_new = Nothing
Next
...全文
238 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
lfzwenzhu 2009-12-03
  • 打赏
  • 举报
回复
我要使用 OLE DB (ADO)这种连接方式
阿泰 2009-12-02
  • 打赏
  • 举报
回复
水晶报表啥版本,搞得这么复杂。。
  • 打赏
  • 举报
回复
不能通过ODBC连接?
lfzwenzhu 2009-12-02
  • 打赏
  • 举报
回复
连的是 sql server 2005
wendahome 2009-12-02
  • 打赏
  • 举报
回复
你连的是什么数据库,sqlserver吗
阿泰 2009-12-02
  • 打赏
  • 举报
回复
你连的是什么数据库,sqlserver吗?
lfzwenzhu 2009-12-02
  • 打赏
  • 举报
回复
XI Release 2 版本
你有什么简单的方法吗?

6,108

社区成员

发帖
与我相关
我的任务
社区描述
其他数据库开发 数据库报表
社区管理员
  • 数据库报表社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧