By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,593 Members | 2,006 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,593 IT Pros & Developers. It's quick & easy.

Networking With Vb6

P: 72
Hello there VB wizards. I have a few questions, regarding how networking works with Visual Basic. It's like this - I have a PC that has the database of all my system. It's like a central database pc. Now I want to know how I can access those databases in another PC. For able for me to me achieve network.

By the way, the databases that are in the central database PC are all Access.

Another question; Will App Path work in accessing another pc?

Can someone guide me to the right path, or give some sites or tutorials on how I can achieve my goal?

Thank you very much.

Looking forward for some tips...
Dec 11 '07 #1
Share this Question
Share on Google+
6 Replies


debasisdas
Expert 5K+
P: 8,127
To access the MDB files you need to specify either the system name or ipaddress from the client pc.

better to put the database files in a shared with password for database.
Dec 11 '07 #2

P: 72
Thank you for that information, but how can i achieve it, can you give me some example codes of that, or could you give some tutorials or site on how to do it.. Thank you very much...
Dec 12 '07 #3

P: 72
Hi guys so far this is the code i have, but it gives me an error that the path name is not valid

Expand|Select|Wrap|Line Numbers
  1. Set cnn = New ADODB.Connection
  2. cnn.ConnectionString = _
  3.  "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  4.           "Data Source=" & App.Path & "\\192.168.1.60\C:\My Documents\DentalDB.mdb;"
  5. cnn.Open
  6.  
192.168.1.60 is the ip address of the computer where the DentalDB.mdb is located...

i think my format is incorrect... Can you give mea little information about this matter.. Thank you.
Dec 14 '07 #4

Expert 5K+
P: 8,434
"Data Source=" & App.Path & "\\192.168.1.60\C:\My Documents\DentalDB.mdb;"
My guess is you should be using either the IP address or App.Path, not both.
Dec 14 '07 #5

P: 72
Hey Guys i already achieve what i want i was able to access my database for different a computer/s... To share with you,, heres my code...

Expand|Select|Wrap|Line Numbers
  1. Dim cnn As New ADODB.Connection
  2. Dim Str As String
  3.  
  4. Set cnn = New ADODB.Connection
  5. Str = "\\Lbv\shareddocs\DentalDB.mdb"
  6. cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Str + ";Persist Security Info=False"
  7. cnn.CursorLocation = adUseClient
  8.  
Where Lbv is the Computer Name, shareddocs is the folder name, and DentalDb.mdb is the database itself...

I hope it can contribute.... To all who replied.. Thank you.!!!
Dec 17 '07 #6

Expert 5K+
P: 8,434
Thanks for sharing. That could be useful for anyone with similar problems in future.

The more people who contribute, the better it gets. :)
Dec 17 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.