Hi. Guys,
Add following code to your program.cs file
try
{
OdbcConnection conDb=new OdbcConnection();
string strsql ;
strsql = "Provider=MSDASQL.1;DSN=dsnApp;UID=sa;pwd=app;";
conDb.ConnectionString = strsql;
conDb.Open();
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
If you are using VB.net your code is here
Thank you :)
Create a dsn with name "dsnApp".
Add following code to your program.cs file
try
{
OdbcConnection conDb=new OdbcConnection();
string strsql ;
strsql = "Provider=MSDASQL.1;DSN=dsnApp;UID=sa;pwd=app;";
conDb.ConnectionString = strsql;
conDb.Open();
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
If you are using VB.net your code is here
Thank you :)