SDAC 6.1.5 bugs with D7
Posted: 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
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