Page 1 of 1

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

Posted: Mon 07 Apr 2014 13:09
by radub
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.

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

Posted: Tue 08 Apr 2014 09:39
by AlexP
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.

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

Posted: Tue 08 Apr 2014 09:55
by radub
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.

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

Posted: Tue 08 Apr 2014 10:53
by AlexP
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.

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

Posted: Tue 08 Apr 2014 11:00
by radub
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.

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

Posted: Tue 08 Apr 2014 13:00
by AlexP
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

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

Posted: Tue 08 Apr 2014 13:14
by radub
Great!
Thank you!
It works.

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

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

Posted: Wed 09 Apr 2014 06:27
by AlexP
Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.