noob

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
56pit
Posts: 2
Joined: Tue 26 Jun 2007 18:02
Location: kentucky

noob

Post by 56pit » Tue 26 Jun 2007 21:18

what are the basics that I need to connect to a database and import or extract a field.

I have tried looking through some of the demo source, but it has been 12 years since I have done any extensive delphi coding.

Thank you

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 27 Jun 2007 08:10

You just need to place several components onto the form, and link them:

MSConnection (SQL Server Access tab) <-- MSQuery (SQL Server Access tab) <-- MSDataSource (SQL Server Access tab) <-- TDBGid (or any other DB-Aware controls from the Data Controls tab)

Now you should provide connection settings for MSConnection, and a correct SQL statement to MSQuery.SQL (like SELECT * FROM dept).

Please take a look at the Query demo that is a part of SDAC General Demo. You can find this demo in the SDAC_InstDir\Demos\SDACDemo directory.
SDAC_InstDir is the SDAC installation directory on your computer.

56pit
Posts: 2
Joined: Tue 26 Jun 2007 18:02
Location: kentucky

Post by 56pit » Wed 27 Jun 2007 15:50

I can open the demo, but when I try to connect to our 2005 server and database I can not get the demo to inherit my security to pass through to the server. When I try to use the Connect and fill in the "user name" and password I get a connection error.

Oh and
Delphi version 11.
Microsoft SQL Server 2005
I'm using the demo of the SDAC.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 02 Jul 2007 08:14

Please make sure that you enter the correct login information, and the user, which name and password you have entered, is allowed to connect to your SQL Server.

You can see what users are allowed to connect to your SQL Server using SQL Server Management Studio. Just browse the Security\Logins in the Object Explorer tree. You can take a look at this MSDN topic for more information.

If this will not help, provide the exact error message.

Post Reply