Click here to Skip to main content
15,889,861 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to connect to the access database which was located in some other system and these are connected in LAN, we had kept the access database in the sharing folder.

I had tried a lot but it was showing the error as below

"'E:\games\All projects\oct\connecttoaccess\connecttoaccess\bin\Debug\10.0.0.3\share\testing.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides."

upto this
E:\games\All projects\oct\connecttoaccess\connecttoaccess\bin\Debug\
it was my program saved path


IP address :10.0.0.3

Sharing foldername :share

database name :testing.mdb

<pre lang="C#">OleDbConnection con = new OleDbConnection("provider =Microsoft.JET.OLEDB.4.0;data source=10.0.0.3\\share\\testing.mdb");




I had seen this configuration in connecting strings site, I think I am doing something wrong, or is there any other process to connect to the access database.

Please help me.


This was an windows application in C#.net;
Posted
Updated 30-Oct-10 11:55am
v4
Comments
Dalek Dave 30-Oct-10 17:55pm    
Edited for Grammar.

Check what is connected to that IP address.
Run up your internet browser and type 10.0.0.3 in the address bar. Press ENTER - what happens?
 
Share this answer
 
Comments
[no name] 30-Oct-10 7:47am    
yes it was opening in the windows form with the folder name as "share" it was kept by me only , in that my database is also opening perfectly
Do the following step :
1) make sure that the share folder on system (that where you put u'r access DB) have a write/read permission.
2) also when you want to access the db file in your apps try like this ;
\\Your comp name\Share\testing.mdb.
3) first just try to run the above path in Start >> Run .
if it fails . then try to run \\your comp name and hit enter.
when window come with a share folder double click on it .
if you see the MDB file try to open the file.
if its open then copy the file path in windows address bar and use it in your apps.

inform me if you stuck with some thing.
 
Share this answer
 
Comments
Dalek Dave 30-Oct-10 17:56pm    
Good call.
RDBurmon 31-Oct-10 4:54am    
Thnks Dalek
i got the answer its an small mistake ,


after a long struggle , i got this , this looks like a funny
thing ,
see the answer one time
"provider =Microsoft.JET.OLEDB.4.0;data source=\\\\10.0.0.3\\share\\testing.mdb");


i had forgot to keep the escape sequences , thats the problem ok
thanku for all ur attenttion ,
thanks a lot
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900