I need your help!

chinese_ant
01-08-2001, 09:50 AM
Dear Sir(Madam):
I need your help!
In my company's small intranet,there is a MS Access database in one of the PCs.Now I want my VB Application in other PCs to read/write that database.However I am in trouble with DSN's configuration and ADO's connection method,especially connectionString.
My boss has ordered me to finish this work in a month,Otherwise I will lose this job.Would you please give a hand to a green-hand!

PWNettle
01-08-2001, 02:52 PM
You can use an ADO connection string with this format for Access97:
<BLOCKQUOTE>Provider=Microsoft.Jet.OLEDB.3.51; Data Source=database_name</BLOCKQUOTE>
For example:
<PRE> Dim con As ADODB.Connection

Set con = New ADODB.Connection

con.Open "Provider=Microsoft.Jet.OLEDB.3.51; Data Source='\\yourserver\yourshare\yourdatabase.mdb'"

' Do whatever with con.

con.Close

Set con = Nothing</PRE>This does not use a DSN...it uses the direct path to the database. Make a share for the folder your database is in and you can use a path like the one above.

Good luck,
Paul

chinese_ant
02-05-2001, 01:10 PM
Thank you very very much.I have solved my trouble.Would you please e-mail me (hhxxttxs@hotmail.com),I am very glad to become your friend!!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum