Hii,
I am using DBase database throught Odbc in ASP.NET. But it gives following error ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Note that, I have applied same code in WindowApplication using C#. In WindowApplication it works properly and gives no error. It gives error olny in WebApplication. I have also tried Access Database using Odbc in ASP.NET and WindowApplication. Here is also the same problem.![Sad [:(]](/emoticons/emotion-6.gif)
My code is here for binding data in DataGrid.
void
BindDg()
{
string conStr = "MaxBufferSize=2048;FIL=dBase 5.0;DSN=newdbase;PageTimeout=5;DefaultDir=C:\\ORIGINAL;DBQ=C:\\ORIGINAL;DriverId=533";
OdbcConnection con = new OdbcConnection(conStr);
string qry = "SELECT ACCOUNTNO, COMPANY, CONTACT FROM Contact1";
OdbcCommand cmd = new OdbcCommand();
cmd.CommandText = qry;
cmd.Connection = con;
OdbcDataAdapter adapter = new OdbcDataAdapter();
adapter.SelectCommand = cmd;
DataSet ds = new DataSet();
adapter.Fill(ds);
this.DataGrid1.DataSource = ds;
this.DataGrid1.DataBind();
}