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

Best way to connect to SQL Server database.

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
I have a Delphi 5 application that works against a SQL Serevr 7.0 database. The method I use for connection at present is to direct all queries/clientdatasets through a single database component. With this database component I set four parameters before connection :
DatabaseName=master
ODBC DSN=ODBCConnectionName
UserName=sa
Password=Password
The connection to "master" is only initial and I then use a query component fed with the syntax 'USE DatabaseName' in order to connect to the database of the users choosing.
Am I better to use an Alias for the database component ?
Do I need the ODBC DSN parameter to be set ?
What is the ideal situation when working against SQL Server databases ?
Thanks in advance.
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top