Thread: Connection Problem
03-08-04, 22:51 #1Registered User
- Join Date
- Mar 2004
Unanswered: Connection Problem
I have two questions about the M.S. Access databse:
(1) Currently, my application connect with the backend Access database via ODBC. So each time after the user installed our system, he/she must
manually create an OBDC DSN in the windows control panel. Is there any other method/tool I can use so that the users don't need to create the DSN manually but our application can still connect with the correct database?
(2) Suppose that the users have added their own data into the database through the interface of our database management module in our system. Each time, when we deliver a new version of our software, we also give users a new version of database with some new data inside. So my question is how can we support the users to merge their own data inside the old database with the new version of database? Is there any software tools or codes avaliable?
03-09-04, 00:40 #2Registered User
- Join Date
- Jan 2004
Re: Connection Problem
Yes using either ADO or DAO. Here is an example using ADO:
dim cn as ADODB.connection
dim rs as ADODB.recordset
set cn = new ADODB.connection
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=C:\Test.mdb;Persist Security Info=False"
cn.open 'Now you have an open connection to Access
set rs = new ADODB.recordset
rs.actiiveconnection = cn
rs.open "SELECT * FROM Table1"
set cn = nothingIn abundance of water only the fool is thirsty. Bob Marley.