Page 1 of 1

SDAC 6.1.5 bugs with D7

Posted: Thu 22 Mar 2012 10:40
by FrenkR
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

Posted: Thu 22 Mar 2012 12:48
by AndreyZ
We already fixed the problem with generating SQL statements in design-time. This fix will be included in the next SDAC build.

Posted: Sun 25 Mar 2012 20:34
by FrenkR
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

Posted: Mon 26 Mar 2012 14:31
by AndreyZ
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.

Posted: Tue 27 Mar 2012 22:06
by Badiboy
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.

Posted: Wed 28 Mar 2012 12:24
by AndreyZ
We are going to release the new SDAC build this or next week.