B
Bernardo Heynemann
The following block of code gives me an error.
MultiBD is my class for multiple databases.
connection= MultiBd.GetConnection(DataProviderType.OLEDB);
connection.ConnectionString = MultiBd.GetConnectionString
(1);
comand = connection.CreateCommand();
comand.CommandText = strSelectComand;
comand.CommandTimeout = 30;
adapter = MultiBd.GetDataAdapter(DataProviderType.OLEDB);
adapter.SelectCommand = comand;
connection.Open();
int numberOfRows = adapter.Fill(myDataSet);
connection.Close();
the connection string is as follows:
Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\inetpub\\wwwroot\\tasks\\db\\db.mdb;User
Id=admin;Password=;
The database is there... But VS.NET gives me this error:
Could not find file 'C:\WINDOWS\SYSTEM32\db.mdb'.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and
where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException:
Could not find file 'C:\WINDOWS\SYSTEM32\db.mdb'.
Source Error:
Line 219:
Line 220: connection.Open();
Line 221: int numberOfRows = adapter.Fill(myDataSet);
Line 222: connection.Close();
Line 223: // }
Source File:
c:\inetpub\wwwroot\tasks\classes\db\dbinteraction.cs
Line: 221
Any help?
Thanx in advance
Bernardo Heynemann
MultiBD is my class for multiple databases.
connection= MultiBd.GetConnection(DataProviderType.OLEDB);
connection.ConnectionString = MultiBd.GetConnectionString
(1);
comand = connection.CreateCommand();
comand.CommandText = strSelectComand;
comand.CommandTimeout = 30;
adapter = MultiBd.GetDataAdapter(DataProviderType.OLEDB);
adapter.SelectCommand = comand;
connection.Open();
int numberOfRows = adapter.Fill(myDataSet);
connection.Close();
the connection string is as follows:
Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\inetpub\\wwwroot\\tasks\\db\\db.mdb;User
Id=admin;Password=;
The database is there... But VS.NET gives me this error:
Could not find file 'C:\WINDOWS\SYSTEM32\db.mdb'.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and
where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException:
Could not find file 'C:\WINDOWS\SYSTEM32\db.mdb'.
Source Error:
Line 219:
Line 220: connection.Open();
Line 221: int numberOfRows = adapter.Fill(myDataSet);
Line 222: connection.Close();
Line 223: // }
Source File:
c:\inetpub\wwwroot\tasks\classes\db\dbinteraction.cs
Line: 221
Any help?
Thanx in advance
Bernardo Heynemann