Evaluation Problems

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Brian Cook
Posts: 3
Joined: Wed 02 Apr 2008 08:48

Evaluation Problems

Post by Brian Cook » Wed 02 Apr 2008 08:55

Greetings!

We're evaluating the SDAC components for Delphi 6 and have encountered two problems...

1. Adding a CRGrid component to a form results in this error message...
[Fatal Error] Unit1.pas(7): Unit CRGrid was compiled with a different version of DBGrids.TColumn

2. An "Incorrect syntax near ')'." error is produced with...

This SQL for a TMSQuery...

select
STATION,
SERIALNUMBER,
ASSEMBLYNUMBER
from
TSTRUN
where
PLANT = 58
and
LINE = 22
and
STATION in ( &StationList )

And this code...

Query.MacroByName('StationList').AsString := '1';
Query.Open;

Thank you for your help,
Brian Cook

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

Post by Antaeus » Wed 02 Apr 2008 12:11

1) SDAC for Delphi 6 requires Update Pack 2. You should install it to solve this problem.

2) Please, check what query is sent to the server. You can do this enabling Debug mode in your TMSQuery, or using SQL Server Profiler.
To enable Debug mode, set MSQuery.Debug to True, and add the SdacVcl unit to the uses clause.

Brian Cook
Posts: 3
Joined: Wed 02 Apr 2008 08:48

Post by Brian Cook » Wed 02 Apr 2008 21:58

Antaeus wrote:1) SDAC for Delphi 6 requires Update Pack 2. You should install it to solve this problem.
Update Pack 2 (and 3) are already installed.

Antaeus wrote:2) Please, check what query is sent to the server. You can do this enabling Debug mode in your TMSQuery, or using SQL Server Profiler.
To enable Debug mode, set MSQuery.Debug to True, and add the SdacVcl unit to the uses clause.
I changed this...

Query.MacroByName('StationList').AsString := '1';

...to this...

Query.MacroByName('StationList').Value := '1';

The query from the debug window is...

select
STATION,
SERIALNUMBER,
ASSEMBLYNUMBER
from
TSTRUN
where
PLANT = 58
and
LINE = 22
and
STATION in ( 1 )

The error is still...

---------------------------
Project2
---------------------------
Incorrect syntax near ')'.
---------------------------
OK
---------------------------

The copied-and-pasted query runs correctly in Microsoft SQL Server Management Studio Express.

Thank you for your help,
Brian Cook

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

Post by Antaeus » Thu 03 Apr 2008 07:00

I could not reproduce these problems.
Please send me a complete small sample at sdac*crlab*com to demonstrate the problem with incorrect syntax, including script to create and fill table.

Also supply me the following information:
- exact version of SDAC. You can see it in the About sheet of TMSConnection Editor;
- exact version of your IDE. You can see it in its About box.
- exact version of SQL server and client. You can see it in the Info sheet of TMSConnection Editor.

Brian Cook
Posts: 3
Joined: Wed 02 Apr 2008 08:48

Post by Brian Cook » Thu 03 Apr 2008 16:42

The files are on the way.

Post Reply