Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TROUBLE WITH DEPLOYING ADO APPLICATION!

Status
Not open for further replies.

selena1

Programmer
Apr 7, 2003
69
I have made a Delphi 7 application that use MySQL database as desktop database. I have used ADO components for connecting and manipulating with database. ADOConnection component connect with database using connection string. When I build connection strig I set following values:

Provider : MySQL.OLEDB Provider
Data Source : Members (my database name)

I didn't changed anything else.

For packing my application I have used "InstallShield Borland Limited Edition". In the package I have include:
1) .exe file
2) database file
3) ADO Data Control 6.0 (Objects/Merge Modules)

After I have distributed my release to CD, I have tried to install application on my computer. Everything work fine. But, trouble is when I install application on some other computer. After I start my application I get error: "Provider configure incorrect." Or something like that. Whwre have I made a mistake? Even if I succeed to instal application to other computer, how I can accomplish that my appliction find the database file no matter where the application and database have installed. I mean, how to avoid hardcoding "Connection string" ?

I have used: mySQL 4.0.13.
MyOleDB3

THANKS!
 
Im not exactly sure, but the error you describe sounds like the necessary drivers are missing from your installation (or perhaps they are not the right version as the ones the program expects ?)

Just a thought..

As for how to connect to database when app first run.. Much will depend on if your program needs to function as a desktop app or part of a client - server system. If its a local app, then maybe install db in App folder (or sub-directory of app path) then call

ExtractFilePath(Application.exename)

to get the path the the data. Build
connection string from that.

If its a Client-Server app, then when program is run - try connect to db. If you encounter an error (program first run or database missing) trap this and bring up a connection routine to allow user to locate path to db. Then store this info either in registry or ini file for next time.

Hope this helps..

Opp.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top