Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ODBC ConnectionString

I have written a program in C# to pull some data using OdbcConnection :

using System.Data.Odbc;
......

OdbcConnection OdbcConn = 
                new OdbcConnection(Properties.Settings.Default.ConnectionString);
OdbcCommand cmd = new OdbcCommand();

//open connection 
if (OdbcConn.State != ConnectionState.Open)
{
    OdbcConn.Open();
}

In my settings file, I have this ConnectionString:

Dsn=****;uid=userID;pwd=password

However I cannot establish a connection. I have an iseries access driver from IBM corp installed, but if I try MS access then I am able to connect. Any suggestions?

like image 234
saiful Avatar asked Feb 21 '12 20:02

saiful


1 Answers

When in doubt (and it involves connections strings): http://www.connectionstrings.com/

like image 197
James Hill Avatar answered Sep 18 '22 07:09

James Hill