Please help with connection string problem

  • Thread starter Thread starter William Gower
  • Start date Start date
W

William Gower

I am converting an ASP app to ASP.net. I need to run the old asp app on my
desktop in the process. I downloaded the files from the web server and set
my connection string as follows

strConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=c:\database\USITracking.mdb;"

I am unable to connect to the database on my machine. What am I doing
wrong?
 
Which type of connection are you making? Make sure that you are using the
OleDb libraries and not the SqlClient libraries as the SqlClient ones are
only for SQL Server. Also, make sure that the IUSR and ASPnet user accounts
have enough permissions to access the db.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
Explain what you mean by "I am unable to connect to the database." What code
are you running? What behavior are you seeing?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
In addition, if you are using C#, make sure that you have escaped the \ characters in your connection string.

ie: strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\database\\USITracking.mdb;"

or

strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\database\USITracking.mdb;"
 
Back
Top