|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DB2 Connection IssueI attempt to connect to another database in another application, I am getting errors. When I create the connection object, I see the following on the "ServerVersion" property: "ServerVersion = '_OledbConn.ServerVersion' threw an exception of type 'System.InvalidOperationException'", but it throws not exception. When I create a command object and attempt to execute the command, I then do get an exceptions of "[System.Data.OleDb.OleDbException] = {" SQL1013N The database alias name or database name \"\" could not be found. SQLSTATE=42705"}". If I go to my desktop and create a ".udl" object to connect to the database, it connects just fine. I took the information out of this file and used it for my connection object. Likewise, if I go into the control panel and go into the ODBC connections, I can connect to this data source just fine. The db2 table that I am able to successfully able to connect to is on another box, but I'm not sure that has to do with anything. Any ideas? JimHeavey wrote:
Show quote > I can connect to one db2 database through my application just fine. Well, it might be wise to use the native DB2 provider from IBM. It's> But when I attempt to connect to another database in another > application, I am getting errors. When I create the connection > object, I see the following on the "ServerVersion" property: > "ServerVersion = '_OledbConn.ServerVersion' threw an exception of > type 'System.InvalidOperationException'", but it throws not > exception. When I create a command object and attempt to execute the > command, I then do get an exceptions of > "[System.Data.OleDb.OleDbException] = {" SQL1013N The database alias > name or database name \"\" could not be found. SQLSTATE=42705"}". > > If I go to my desktop and create a ".udl" object to connect to the > database, it connects just fine. I took the information out of this > file and used it for my connection object. Likewise, if I go into > the control panel and go into the ODBC connections, I can connect to > this data source just fine. > > The db2 table that I am able to successfully able to connect to is on > another box, but I'm not sure that has to do with anything. > > Any ideas? in the latest client-access client. FB -- ------------------------------------------------------------------------ Lead developer of LLBLGen Pro, the productive O/R mapper for .NET LLBLGen Pro website: http://www.llblgen.com My .NET blog: http://weblogs.asp.net/fbouma Microsoft MVP (C#) ------------------------------------------------------------------------ Do you have IBM's DB2 connect in the machine where the Data Access component
lives -- Show quoteThanks & Regards, Sundar Narasiman "JimHeavey" wrote: > I can connect to one db2 database through my application just fine. But when > I attempt to connect to another database in another application, I am getting > errors. When I create the connection object, I see the following on the > "ServerVersion" property: "ServerVersion = '_OledbConn.ServerVersion' threw > an exception of type 'System.InvalidOperationException'", but it throws not > exception. When I create a command object and attempt to execute the > command, I then do get an exceptions of "[System.Data.OleDb.OleDbException] = > {" SQL1013N The database alias name or database name \"\" could not be > found. SQLSTATE=42705"}". > > If I go to my desktop and create a ".udl" object to connect to the database, > it connects just fine. I took the information out of this file and used it > for my connection object. Likewise, if I go into the control panel and go > into the ODBC connections, I can connect to this data source just fine. > > The db2 table that I am able to successfully able to connect to is on > another box, but I'm not sure that has to do with anything. > > Any ideas? > > |
|||||||||||||||||||||||