Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
Create or edit an OLE-DB connect string during runtime. Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
An easy way to edit or create OLE-DB connect strings 22-Jan-04
Category
ADO/OLE-DB
Language
Delphi All Versions
Views
980
User Rating
8
# Votes
4
Replies
1
Publisher:
Darley, F. Joe
Reference URL:
			I always wanted to find a way to edit or create an OLE-DB connect string during 
runtime, instead of doing it the old way by stopping an application and setting the 
connect string during design time and restarting the application again. Well I have 
found a way in doing so here is the source codes below to edit or create an OLE-DB 
connect string.
1   
2   procedure Tform1.Button1Click(Sender: TObject);
3   begin
4       adoCon.Connected :=false;
5   // PromptDataSource takes the form handle and the
6   // second pramater takes a empty string or a OLE-DB Connection string to edit.
7   
8       adoCon.ConnectionString := PromptDataSource(handle,edtConnection.text);
9       adoCon.Connected :=true;// ado set to true to open the new connection
10  end;
11  
12  {once the button is pressed it will bring up the Datalink form and from there you 
13  can create or edit a ole-db connection string. once you have finished with the form.
14  the PromptDataSource function will return the connections string.}



			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC