Link to home
Create AccountLog in
Avatar of rutgermons
rutgermons

asked on

delphi, sql deplhi, 7, connect to sql server 2000

folks

i need an example of how to connect to sql server 2000 using delphi 7

has anyone go an example?

all help will do
ASKER CERTIFIED SOLUTION
Avatar of 2266180
2266180
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of crxi
crxi

Use the BDE Administrator.  Go to the Database tab, and right click to add a new database, select the SQL Server, and continue on entering the appropriate parameters.  The most important would be database name and user name.  The other defaults will probably work.
and keep in mind, when using BDE you will have to deply the BDE redistributables with your application, otherwise it will not work on other computers (which don't have BDE installed)
Avatar of rutgermons

ASKER

how do i add tables to the connection to base my query on?
which method? ado or bde?
After you define your database connection in BDE, you go into Delpi IDE and under the tool bar there is a tab for BDE.  There is also one for ADO.  Click on the BDE tab and you get object types to define the database, tables, procedures and queries.

Ciuly is right about installing the BDE when deploying the application.  That's they way I've done in the past, but after reading about the ADO, I agree that's the way to go.  The BDE is handy for development however.