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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating an ODBC Link using delphi 5

Status
Not open for further replies.

minckle

Programmer
Mar 17, 2004
142
GB
Is there a way to programatically create a ODBC Data Source
using Delphi 5.

If there is, I would be gratefull for any tips, hints or tutorials

Thanks
 
Hi Minckle,

Try the following code:


var
MyLst: TStringList;
begin
MyLst := TStringList.Create;
try
with MyLst do
begin
Add('SERVER NAME=C:\Database\test.gdb');
Add('USER NAME=SYSDBA');
end;
Session1.AddAlias('IBAlias', 'INTRBASE', MyLst);
Session1.SaveConfigFile;
finally
MyLst.Free;
end;


Good luck!
Ryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top