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?
When in doubt (and it involves connections strings): http://www.connectionstrings.com/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With