Home > Software engineering >  How to connect LAN access database file
How to connect LAN access database file

Time:10-07

Using vb to write a simple database program, want to be a local area network (LAN) to add the function of data access database, began to local are ok, not to FTP database, a warrior for help:
Dim conn as new adodb. Connection
Dim constr as string
Dim as SQL string
Private sub command1_click ()
Constr="provider=Microsoft. Jet. The oledb. 4.0. Data source="& amp; Iif (right (app. The path, 1)="", the app. The path, app. The path & amp; "") & amp; "Db1. MDB"
Conn. Open constr
SQL="insert into information (name, birthday) values ('" & amp; Text1. Text & amp; "', '" & amp; Text2. Text & amp; "')
"Conn. Execute SQL
Conn. Close
Msgbox "successful"
End sub

Want to change to local area network (LAN) in the \ \ 192.168.1.10\1 \ db1 MDB, warrior, please help how to modify, or other methods can realize the function of the LAN database to add

CodePudding user response:

Share this file soon,

A Shared disk, and then use access,

This stuff seems can't be multi-user,

CodePudding user response:

Set the directory with access database to fully share, in the code that connect: \ \ computer name (or IP address), Shared directory name, database name
If more concurrent connections, we suggest use SQL database

CodePudding user response:

Can also ACCESS database, the data files in LAN server setup completely Shared, then the table structure file on the local hard drive, through the link table to: \ \ computer name (or IP address) Shared folder name \ \ server database file name, so that you can like ACCESS to the local ACCESS data directly read and write

CodePudding user response:

Files to share to

CodePudding user response:

When meet any one condition:
1: more than one user
2: no native storage

Strongly recommend the SQL server

CodePudding user response:

If on the basis of the stand-alone version change, the most simple way Shared directory, and can be directly articulated,

If you want to support more users, can be made a WinSock service/customer architecture of the system, all of the data query, changes to the server to do, in fact, some sites of database query, is Access to implement on the server,

CodePudding user response:

Sharing, and then do the disk mapping, and then just like normal access to the local disk access

But Suggestions in SQL
  • Related