Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to Informix using .net 2

Status
Not open for further replies.

DaveMac1960

IS-IT--Management
Mar 16, 2007
16
US
I'm probably wasting breath here, but if anyone could help me out it would be much appreciated.

I'm trying to connect to an Informx 7.x database from a .net application. Below is the code in question:

Public Const VisionConn = "DSN=Vision;Provider=SQLOLEDB;user ID=userID;password=password;DATABASE=v001"

Dim cnn As New OleDb.OleDbConnection(VisionConn)
Dim cmd As OleDb.OleDbCommand
Dim rdr As OleDb.OleDbDataReader

cmd = New OleDb.OleDbCommand( _
"SELECT * FROM drmast " _
& "ORDER BY drno ", cnn)

cnn.Open()

When the code executes, I get a "Login failed for 'userID'; Invalid connection string attribute" error. Well the login is valid so I figure that part is bogus. Naturally .net does not give me any indication which connection attribute is invalid.

Thanks a bunch in advance,
Dave
 
Thanks to both of you for your help. I had already found the connection strings jmeckley pointed me to but I couldn't get them to work in .net.

The VBS script ca8msm gave me another connection string, but the provider MSDASQL.1 is not recognized in .NET (too old). Thank you for that Microsoft.

Thanks for your help guys but it looks like I may have to figure this out on my own.

Thanks again,
Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top