SQL server 2005 with prSQL insert "exec" before "disable trigger..."

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
radub
Posts: 105
Joined: Sat 10 Jul 2010 18:46

SQL server 2005 with prSQL insert "exec" before "disable trigger..."

Post by radub » Mon 07 Apr 2014 13:09

Hello,

Having a 2005 sql server with Provider=prSQL in the options of the TMSConnection, a TMSQuery with sql statement of "disable trigger TRIGGER_NAME on TABLE_NAME", generates an error on executing it, because appears the "exec" word in front of the statement at execution time.

This error doesn't occur with 2008 sql server, nor setting the provider to prAuto.
The Provider was set to prSQL because of the "Unable to find record" issue posted on January 10th, in a reply by Dimon.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SQL server 2005 with prSQL insert "exec" before "disable trigger..."

Post by AlexP » Tue 08 Apr 2014 09:39

Hello,

Please specify the versions of the IDE, SDAC and the OLEDB provider, since the problem is not reproduced on the latest SDAC version 6.9.18 and OLEDB version 06.01.7601.

radub
Posts: 105
Joined: Sat 10 Jul 2010 18:46

Re: SQL server 2005 with prSQL insert "exec" before "disable trigger..."

Post by radub » Tue 08 Apr 2014 09:55

SDAC 6.9.18, Delphi 7.
OLEDB provider I don't know where to find it.

But, please be aware that this situation occurs only along with MSSQL server 2005.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SQL server 2005 with prSQL insert "exec" before "disable trigger..."

Post by AlexP » Tue 08 Apr 2014 10:53

Hello,

The OLEDB version can be found out in the MSConnection dialog on the Info tab (after establishing connection). We checked this behavior on both 2008 and 2005 servers.

radub
Posts: 105
Joined: Sat 10 Jul 2010 18:46

Re: SQL server 2005 with prSQL insert "exec" before "disable trigger..."

Post by radub » Tue 08 Apr 2014 11:00

Theese are the versions on my station
Microsoft SQL Server: 09.00.1399
Microsoft OLE DB Provider for SQL Server: 08.00.1132

at production site is
Microsoft SQL Server: 09.00.4060
Microsoft OLE DB Provider for SQL Server: 06.01.7601

On both sides same problem.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SQL server 2005 with prSQL insert "exec" before "disable trigger..."

Post by AlexP » Tue 08 Apr 2014 13:00

We have reproduced the described behavior on this version of the OLEDB provider. This behavior is due to OLEDB, and we cannot affect it. To solve the problem, you can edit the query text in the following way:

Code: Select all

alter table TABLE_NAME disable trigger TRIGGER_NAME

radub
Posts: 105
Joined: Sat 10 Jul 2010 18:46

Re: SQL server 2005 with prSQL insert "exec" before "disable trigger..."

Post by radub » Tue 08 Apr 2014 13:14

Great!
Thank you!
It works.

This case is closed.
Pending the other....

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SQL server 2005 with prSQL insert "exec" before "disable trigger..."

Post by AlexP » Wed 09 Apr 2014 06:27

Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.

Post Reply