SDAC 6.1.5 bugs with D7

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FrenkR
Posts: 6
Joined: Tue 06 Jul 2010 23:09

SDAC 6.1.5 bugs with D7

Post by FrenkR » Thu 22 Mar 2012 10:40

Hi,
i switched from SDAC3.8 to latest SDAC6.1 (using delphi 7) and now I am getting multiple errors:
- auto generated updates/inserts are generated with quotes no matter what I set on TMSQuery component(Quotedidentifiers)
- generating SQL statements in design time generates AccessViolation in module dac70.bpl
-- AV
exception class : EAccessViolation
exception message : Access violation at address 03B41C3C in module 'dac70.bpl'. Read of address 00000004.
main thread ($e40):
03b41c3c dac70.bpl Dbaccess TDASQLGenerator.AddFieldToInsertSQL
03b41cfb dac70.bpl Dbaccess TDASQLGenerator.GenerateInsertSQL
03e09da0 sdac70.bpl Msservices TCustomMSSQLGenerator.GenerateInsertSQL
03b428bb dac70.bpl Dbaccess TDASQLGenerator.GenerateSQLforUpdTable
03cb28b8 dcldac70.bpl Dasqlgeneratorframe TDASQLGeneratorFrame.GenerateSQLforUpdTable
03cb2bdc dcldac70.bpl Dasqlgeneratorframe TDASQLGeneratorFrame.btGenerateClick

- when selecting table names in *SQL generator*, invalid primary key is selected by a default. Example:
create table Test( A varchar(10) primary key, B int identity)
field *B* is selected as a key, A as Update field

- when table name is started with underscore (e.g. _Test), automatically generated insert statement, that is invalid, looks like:
exec sp_executesql N'insert into "[_Test]"("A") values(@p1)',N'@P1 varchar(4), 'MCAD'
statements generate an error *invalid table name [_Test]*. If I remove quotes from table name, then update goes further.
Questines here are:
- why table name is in *quotes* or why square brackets are added?
- why sp_executesql is used instead of plain *connection.exec*?


Rgds,
Frenk

AndreyZ

Post by AndreyZ » Thu 22 Mar 2012 12:48

We already fixed the problem with generating SQL statements in design-time. This fix will be included in the next SDAC build.

FrenkR
Posts: 6
Joined: Tue 06 Jul 2010 23:09

Post by FrenkR » Sun 25 Mar 2012 20:34

Thanks. Generating update SQLs was done by a dataset resolver. I fixed this. When can I expect new build to be available for a download?
What about PK selection? Has Identity field always advantage over selecting real table PK?
Rgds,
Frenk

AndreyZ

Post by AndreyZ » Mon 26 Mar 2012 14:31

You are right, the IDENTITY column has advantage over PRIMARY KEY. The advantage of using IDENTITY column is that it is faster to execute queries using one IDENTITY column than several (possible) columns of PRIMARY KEY.

Badiboy
Posts: 4
Joined: Mon 04 Jan 2010 15:56

Post by Badiboy » Tue 27 Mar 2012 22:06

FrenkR wrote:Thanks. Generating update SQLs was done by a dataset resolver. I fixed this. When can I expect new build to be available for a download?
AndreyZ wrote:We will release the new SDAC build approximately in two weeks.
http://www.devart.com/forums/viewtopic. ... 9512#79512
2 weeks from 19.03.2012.

AndreyZ

Post by AndreyZ » Wed 28 Mar 2012 12:24

We are going to release the new SDAC build this or next week.

Post Reply