If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > runtime connection to DB,Delphi 6

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-05-04, 00:40
acassamo acassamo is offline
Registered User
 
Join Date: Mar 2004
Location: maputo
Posts: 5
Unhappy runtime connection to DB,Delphi 6

hi there! i am developing an application in Delphi 6.i set the connection String in design time to a local database. when i take the application to other machine it does not run.i found out that i looks for the path i set in my machine and it does not find it. so i need to connect to the database at run time... need some code! i am Using ADOTable.

Thanx in advance

Abdul
-------
Reply With Quote
  #2 (permalink)  
Old 03-13-04, 21:13
Djangman Djangman is offline
Registered User
 
Join Date: Mar 2004
Location: Calgary, AB Canada
Posts: 7
The last thing I do before my final build is to de-activate all my connections - I've had that same problem many times.

I handle the runtime aspect in one of three ways:
1) I have the connection string in an .ini file
2) I have the connection string in the registry
3) I pass part or all of the connection string as a command line parameter.

I have my tables, datasets, connections, etc. in a datamodule. In the .OnCreate event of the datamodule is where I get the connection string and assign it.

Good luck,

Djangman
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On