0

hallo can someone please help me my Access Database ConnectionString does not work on the server

string strConnString =
            "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|calculator.mdb";
2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Gospp
0

hallo can someone please help me my Access Database ConnectionString does not work on the server

string strConnString =
            "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|calculator.mdb";

Hello.

The '|' looks a bit fishy, I think the normal syntax is '\' ??
I would recommend you to add a '@' in front of the string, as it tells the program to read the string "as is".

string strConnString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\temp\Nwind.mdb";

Hope it helps!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.