G
Guest
I am having a problem writing to an Access database. It only seems to work if the database is placed in c:\
Retrieving records from it is no problem when it is placed in a subdirectory of mapppath, but writing to it is impossible (unless I put it in c:\).
This is the code that refuses to work:
Dim myConString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & MapPath("db\users.mdb") & ";Jet OLEDBatabase Password=123;"
This is the code that works for me:
Dim myConString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\users.mdb" & ";Jet OLEDBatabase Password=nt2123;"
The mappath dir and the \db dir as well as the database file itself have read and write permissions.
Why does it not work???
Retrieving records from it is no problem when it is placed in a subdirectory of mapppath, but writing to it is impossible (unless I put it in c:\).
This is the code that refuses to work:
Dim myConString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & MapPath("db\users.mdb") & ";Jet OLEDBatabase Password=123;"
This is the code that works for me:
Dim myConString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\users.mdb" & ";Jet OLEDBatabase Password=nt2123;"
The mappath dir and the \db dir as well as the database file itself have read and write permissions.
Why does it not work???