error in oledb connection string
-
Hi, I just want to connect with an microsoft access database in a remote mechine. At first i try to connect with a database in local mechine. Dim Cn As OleDbConnection Dim strConString As String strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\localhost\D:\News\News\bin\News.mdb" Cn = New OleDbConnection(strConString) Cn.Open() i got an error : '\\localhost\D:\News\News\bin\News.mdb' is not a valid path. Please help me. Thanks Thomas
-
Hi, I just want to connect with an microsoft access database in a remote mechine. At first i try to connect with a database in local mechine. Dim Cn As OleDbConnection Dim strConString As String strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\localhost\D:\News\News\bin\News.mdb" Cn = New OleDbConnection(strConString) Cn.Open() i got an error : '\\localhost\D:\News\News\bin\News.mdb' is not a valid path. Please help me. Thanks Thomas
thomas_joyee wrote:
i got an error : '\\localhost\D:\News\News\bin\News.mdb' is not a valid path.
Yea, right. So what have you done to attempt to solve this problem? Tell us so we can help you.
...Steve
1. quod erat demonstrandum 2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once :-) -
thomas_joyee wrote:
i got an error : '\\localhost\D:\News\News\bin\News.mdb' is not a valid path.
Yea, right. So what have you done to attempt to solve this problem? Tell us so we can help you.
...Steve
1. quod erat demonstrandum 2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once :-)Sir, i tried following options. strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\127.0.0.1\D:\News\News\bin\News.mdb" strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\computername\D:\News\News\bin\News.mdb". But these are not working. Thanks for your reply Thomas
-
Sir, i tried following options. strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\127.0.0.1\D:\News\News\bin\News.mdb" strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\computername\D:\News\News\bin\News.mdb". But these are not working. Thanks for your reply Thomas
You are first trying to connect to an MDB on your local machine right? If so, the
Data Source
parameter is malformed for a local path. That's what the error message has told you already. Try copying the path you specify into the address box of Windows Explorer and see what it tells you. Now modify it until it works and then you should be able to use that in your connect string....Steve
1. quod erat demonstrandum 2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once :-) -
You are first trying to connect to an MDB on your local machine right? If so, the
Data Source
parameter is malformed for a local path. That's what the error message has told you already. Try copying the path you specify into the address box of Windows Explorer and see what it tells you. Now modify it until it works and then you should be able to use that in your connect string....Steve
1. quod erat demonstrandum 2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once :-)Hi, with windows explorer i found this code will work. strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\127.0.0.1\D\News\News\bin\News.mdb" Thanks for your valuable help. Thomas
-
Hi, with windows explorer i found this code will work. strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\127.0.0.1\D\News\News\bin\News.mdb" Thanks for your valuable help. Thomas
You are very welcome. Another happy customer :)
...Steve
1. quod erat demonstrandum 2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once :-)