09-10-03, 21:31 #1Registered User
- Join Date
- Sep 2003
Unanswered: ADO Data Control and Deployment Setup
I am using an ADO data control in Visual Basic 6.0 to connect to a Microsoft Access database. I click on the Connection String property of the ADO data control, then click on the elipsis to build the connection. In the General tab, I click the Use Connection String option button. Then I click Build. From the Provider tab, I select Microsoft Jet 3.51 OLE DB Provider, then click next. Here is where the trouble begins. In the ado data control there have a connection string property which I put as Provider= Microsoft... Data Source=c:\cole.mdb.
My problem is when deployment and packaging time the program can't read from the source/path of the Microsoft Access file. Do I need to change the connection string?
09-11-03, 17:48 #2Useless...
- Join Date
- Jul 2003
If you're distributing the COM separately from the Access DB, then the COM cannot find the DB. By forcing the path to "c:\..." you're requiring the DB to be on the computer that the COM object is installed.
If you need to distribute it separately, you could setup a DSN on the computer hosting the Access DB, or put it on a shared drive that everyone has access to.
Under Win2k, you can setup a DSN by going to Start > Settings > Control Panel > Administrative Tools > Data Sources (ODBC)
Once you have a System DSN setup, your COM's Connection String would point to the server and DSN that's hosting the Access DB.
If you plan to have many people using this COM, and accessing this DB, concurrently, MS Access is not very robust. You may want to consider migrating the DB into SQL Server.That which does not kill me postpones the inevitable.