Sunday, March 11, 2012

Connecting to Delphi

Somenone can help me to connect a MSSQL to a Delphi App.what are you want to know? explain please...|||well, my problem its that i build the data bases in MSSQL, i already setup a DNS in OBDC, but whe in try to call that DNS from a Delphi application this throw me an error on conection, you can help me explaining me the steps to make a good setup of a simple database in MSSQL for use with Delphi

Thanks|||Hi,

Here is a simple way to connect to sql server using ODBC DSN & Delphi.
I hope this will help you.

1. Drop a Database Component from DataAccess Tab

2. Set the following properties for Database Component
1. AliasName - The DSN name created with ODBC
2. DatabaseName - The database you want to connect to sql server for example give "PUBS"
3. Login Prompt - False
4. Name - "PUBS_DB"
5. Params - USER NAME=SA
DATABASE NAME=PUBS

3. Now Drop a Table Component from DataAccess Tab

4. Set the following properties for Table Component
1. DatabaseName - PUBS
2. Now in "Table", select the table name you want
3. Active - True

5. Drop a DataSource and Link the dataset to Table

6. Now drop a DBGrid from DataControls and link the datasource.

Regards,
Selva Balaji B.|||i made it
thankz
i got another question, what about connecting to a server in my LAN, what should i configurate
thankz again

No comments:

Post a Comment