The SQL Connection Basics.

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Jerbear
Posts: 13
Joined: Sun 02 Nov 2008 10:33
Location: Ireland

The SQL Connection Basics.

Post by Jerbear » Mon 01 Aug 2016 15:48

Can some one explain or post an example to do the following using the SDAC and Delphi.

This is probably as NEWBIE as it gets but I have my reasons for asking....
If I'm right I shall elaborate, If I'm wrong I shall crawl into a hole never to return....
I suspect I shall be doing the latter.....

Place a DBGRID on a form and populate it with data from any table in a SQL Database...

What components are required to do this and how do they connect to one another so that ALL fields appear in the DBGRID's Columns Editor.

ViktorV
Devart Team
Posts: 2299
Joined: Wed 30 Jul 2014 07:16

Re: The SQL Connection Basics.

Post by ViktorV » Tue 02 Aug 2016 11:12

You can learn how to use SDAC from our online documentation: https://www.devart.com/sdac/docs/?get_start.htm and using our SDacDemo project. You can find the SDacDemo project in the %SDACDemos%\SDacDemo directory. %SDACDemos% is the SDAC Demo projects installation path on your computer. See more details about working with SDAC demo projects in the SDAC help: https://www.devart.com/sdac/docs/?demos_sdac.htm

Jerbear
Posts: 13
Joined: Sun 02 Nov 2008 10:33
Location: Ireland

Re: The SQL Connection Basics.

Post by Jerbear » Tue 02 Aug 2016 11:26

Thanks for the response.....

I've already gone through that documentation but it hasn't answered my question.
Remember I'm a SQL Newbie at the ripe young age of 63. The grey cells are rapidly declining..

Generally prior to SQL when I placed a DBGrid component on a form and connected it to a datasource which was connected to a dataset I had access to all fields via the DBGrid Columns Editor.

However, with SQL it seems I have to add the fields I want to a SQLQuery to get them to show up in
the DBGRID Columns Editor.
Is this the norm for SQL DB programming are am I missing something.

This is why I was looking for an example. DBGRID Connected to WHAT connected to WHAT etc etc..

ViktorV
Devart Team
Posts: 2299
Joined: Wed 30 Jul 2014 07:16

Re: The SQL Connection Basics.

Post by ViktorV » Tue 02 Aug 2016 13:23

Since our components TMSQuery, TMSTable are descendants of the TDataSet base class and implement its interface, you should refer to Embarcadero documentation in order to learn how to work with TDataSet and about its relation with TDBGrid: http://docwiki.embarcadero.com/Librarie ... B.TDataSet http://docwiki.embarcadero.com/Librarie ... ds.TDBGrid

Jerbear
Posts: 13
Joined: Sun 02 Nov 2008 10:33
Location: Ireland

Re: The SQL Connection Basics.

Post by Jerbear » Tue 02 Aug 2016 16:13

Was searching a different problem on here and found the answer to my question.
http://forums.devart.com/viewtopic.php ... %3B#p67044

In case anyone else is looking for it...

ViktorV
Devart Team
Posts: 2299
Joined: Wed 30 Jul 2014 07:16

Re: The SQL Connection Basics.

Post by ViktorV » Wed 03 Aug 2016 10:30

We are glad to know you have found a solution on our forum. Please contact us if you have question concerning SDAC.

Post Reply