On Mon, 14 Jul 2003 21:27:57 +0200, "Peter Rabbit" <(E-Mail Removed)> wrote:
¤ My attempts to open a Jet database in CSharp .Net fail. I am trying the
¤ following:
¤ string cstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Documents and
¤ Settings/.../Data/List.mdb;Connect Timeout=5";
¤
¤ OleDbConnection sdb = new OleDbConnection(cstr);
¤
¤ sdb.Open();
¤
¤ but the Open generates an OleDbException. Is there soemthing wrong with the
¤ connection string?
Yes, you need to escape the slash character in your database file path:
OleDbConnection objConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\\My
Documents\\db1.mdb");
Paul ~~~
(E-Mail Removed)
Microsoft MVP (Visual Basic)