Excuse me, how to connect to the server client access database? Use ADO can achieve access to the local database (before), I for remote communication this is not very understanding, masters show just a little, please. Thank you!
Local access connection: m_Conn SetConnectionString (" Provider=Microsoft. ACE. The OLEDB. 12.0; Data Source name=database. Accdb;" );
How remote access? Intends to use the IP address access at the moment
CodePudding user response:
Need specific condition is met to ACCESS remote ACCESS:ACCESS database files must be Shared on the Internet, such as have a computer in your network, computer named "PC2014" D disk on the computer, have your ACCESS database files, so the D plate Settings for sharing, and open to modify permissions,
Then your connection string may wrote:
M_Conn. SetConnectionString (" Provider=Microsoft. ACE. The OLEDB. 12.0; The Data Source=\ \ pc2014 \ d: \ database name. MDB;" );
CodePudding user response:
Really thanks for your reply, to plan is very clear, thanks again,That my client want to change the database on the server,
I'm on the client side how to directly manipulate the remote database?
Or I need to send commands to the server, the server program there operation database, and then return the results to the client,
I'm going to use the Socket class,
I am a first-time communication on this, hope to get further help,
CodePudding user response:
You this kind of circumstance had better be to use MS SQL or MYSQL, they are all support remote ACCESS to the database, if you want to use the ACCESS, can follow what I said earlier, directly on the server to the ACCESS database file sharing, and to set up can read and write permissions, and then in the connection string, directly set up a remote database specific directory location:For example: the IP address of the server is: 192.168.18.100
M_Conn. SetConnectionString (" Provider=Microsoft. ACE. The OLEDB. 12.0; The Data Source=192.168.18.100 \ \ d: \ \ database name. MDB;" );
If the server does not make this setting (usually won't let you go, unless you are tube server), you will only consider on the server side to write a program that receives commands from the client, and then use it to operate on the server ACCESS database, this method is more troublesome, workload is big, or recommend you to change the database, anyway you are using ADO, change the database, only need to modify the connection string
CodePudding user response:
The if is the ACCESS database website only basically PHP, asp, such as a road, if it is your own server or application the best solution is to use used to replace the ACCESS database, database query and the connection part in the program it is ok to change a little, can be direct or through Datasnap technology such as establishing the middle server, client remote connectionIf must use ACCESS database, you can share the database file (can be mapped to a local disk), in middle Datasnap server or similar function of the software, or simply use the remote desktop software, or some mapping functions of VPN software
CodePudding user response:
Very thanks for your reply,The testing successful, very happy, only the connection string Data Source name=\ \ \ \ server \ \ folder \ \ mydata MDB,
Thank you for your attention
CodePudding user response:
There are some good in vc database class by a third party