Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Network Questions

Status
Not open for further replies.

dabineri

Programmer
Jun 20, 2001
265
US
I am using VB6 on a LAN with 4 other computers. One computer has my app and an access data base. I would like the other computers, also running the same app, to have access to the same single data base.

In VB, how do I allow the others to work with the database across the network? What issues will I need to worry about? This not a sophisticated app but a little security might be nice.

Thanks for any advice. David Abineri

 
There's no problem as far as the application is concerned running on different machines on a LAN.

Getting to your database will work the smoothest for you if the database resides on the server, i.e., file server, rather than on your machine. You'll want to consider though the issues involved in attempting to get access to the same record in the Access database. There are some potential issues here.

Solutions by Jim Null
 
There are no real issues as far as I can see. Easiest way is to set up an ODBC connection to the computer with the database on.

Blatently stolen from ASPEMPORIUM.COM:

'this one could be a connection to any type of database.
'You would have to open up the DSN and review the settings
'to find out what type of database it accesses.
object.Open "DSN=dsn_name;", "usr", "pass"

'this is the old-school ODBC style MS Access database conn
'string. This works great on Windows 95 or 98 but if I ever
'catch you using it on NT or 2000, I'll wrap your knuckles.
object.Open "DBQ=C:\db.mdb; DRIVER={Microsoft Access Driver (*.mdb)};"

'MS Access with a workgroup.
object.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=C:\db.mdb;SystemDB=C:\db.mdw;", "usr", "password"

'Oracle with ODBC
object.Open "Driver={Microsoft ODBC for Oracle};" & _
"Server=serv_name.db_name;Uid=usracct;Pwd=password;"

'SQL Server ODBC
object.Open "Driver={SQL Server};" & _
"Server=serv_name;Database=db_name;Uid=usracct;Pwd=password;"



Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top