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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database on Network!

Status
Not open for further replies.

desprits

Programmer
Feb 14, 2004
40
0
0
CA
How I should proceed to install on a local area network a program in VB which uses an Access database ! I want to share the database.

Thk!
 
You can put the exe and any support dll files in a shared directory. Then either write a script to register the files on the users' machines from the network or better yet have the program do it automatically (see other threads on how to do this).

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
I like to address an ODBC refering to the DB.

The advantage of that approach is that you can link to wherever you want and you can even change the sort of DB you are using with a minimum of effort.

If you want to create an install for this ODBC entry, even that is not dificult. All you have to do write the correct entries in the registry. Something that can easily be done with a small batch-program or script that runs a .reg-file.
Code:
example:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\ODBC\ODBC.INI]

[HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\abonne]
"Driver"="<path to DB driver, backslash needs to be doubled>"
"DBQ"="<path to db, backslash needs to be doubled><dbname+extension>"
"Description"="<description of DB>"
"DriverId"=dword:00000019
"FIL"="MS Access;"
"SafeTransactions"=dword:00000000
"UID"=""

[HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources]
"<link to db>"="Microsoft Access Driver (*.mdb)"
 
I would stay away from ODBC... The person can actually run the EXE from the shared drive, but yes OCX's and DLL's would have to be registered before use. You could do what is called and Advertised install.

As for connecting to the Database try OLEDB. Then you don't have to worry about creating a registry setting on each persons PC. As well if the DLL's use COM then only the server DLL needs to know where the DB is.

Casper

&quot;I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day.&quot;
~Frank Sinatra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top