Page 1 of 1
Evaluation Problems
Posted: Wed 02 Apr 2008 08:55
by Brian Cook
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
Posted: Wed 02 Apr 2008 12:11
by Antaeus
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.
Posted: Wed 02 Apr 2008 21:58
by Brian Cook
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
Posted: Thu 03 Apr 2008 07:00
by Antaeus
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.
Posted: Thu 03 Apr 2008 16:42
by Brian Cook
The files are on the way.