Hello
I use:
Delphi XE6
Win 7 64 bit
SDAC 7.1.4 Pro for Delphi XE6
SQL Server 2008 R2
In my program, I am using ‘prDirect’ provider of the TMSConnection, and i have SQLQuery of type TSDACMSQuery.
I set:
SQLQuery.SQL.Text := SQL;
where SQL equal to:
' DECLARE @ResourceName NVARCHAR(255) SET @ResourceName = N''LOUN_SO_92120414'' EXEC master.dbo.sp_getapplock @Resource = @ResourceName , @LockMode = Exclusive, @LockOwner = Session' (read=GetFinalSQL)
and then when i call to:
SQLQuery.Execute();
i get the following exception:
The following error has occurred in the application :
Exception class: 'Exception'
Exception message: 'Exception of class ''ETDSError'' has occured.
Exception Message: Could not find stored procedure ''master.dbo.sp_getapplock@Resource@ResourceName,@LockModeExclusive,@LockOwnerSession''.'
In SDAC 6.10.20 for Delphi XE6 this didn't happen.
Please let me know how to solve this.
Thanks.
Exception Message: Could not find stored procedure ''master.dbo.sp_getapplock
Re: Exception Message: Could not find stored procedure ''master.dbo.sp_getapplock
Thank you for the information. We have reproduced this problem and are investigating it. We will notify you about the results as any are available.
Re: Exception Message: Could not find stored procedure ''master.dbo.sp_getapplock
if connection is Native mode, no problem but connection is Direct has problem.
Successfully executed the command.
The operation completed with errors.
I tried to trace in SQL Server Profiler and find problem.
original sql
changed sql
exec sp_addextendedpropertyN'MS_Description',N'asdfasdf',N'schema',N'dbo',N'table',N'date_object11'
Perhaps the direct connection mode seems to be a bug.
Code: Select all
QTemp.Connection.options.provider = prNativeClient;
QTemp.Connection.Connect;
With QTemp do
begin
Close;
SQL.Clear;
SQL.Add('EXEC sp_addextendedproperty N''MS_Description'',N''Date'',N''schema'',N''dbo'',N''table'',N''date_object''')
end;
QTemp.Open;
Code: Select all
QTemp.Connection.options.provider = prDirect;
QTemp.Connection.Connect;
With QTemp do
begin
Close;
SQL.Clear;
SQL.Add('EXEC sp_addextendedproperty N''MS_Description'',N''Date'',N''schema'',N''dbo'',N''table'',N''date_object''')
end;
QTemp.Open;
I tried to trace in SQL Server Profiler and find problem.
original sql
Code: Select all
exec sp_addextendedproperty N'MS_Description',N'asdfasdf',N'schema',N'dbo',N'table',N'date_object11'
Code: Select all
exec sp_addextendedpropertyN'MS_Description',N'asdfasdf',N'schema',N'dbo',N'table',N'date_object11'
Perhaps the direct connection mode seems to be a bug.
Re: Exception Message: Could not find stored procedure ''master.dbo.sp_getapplock
We have reproduced these problems and fixed it. These fixes will be included into the next SDAC build.
Re: Exception Message: Could not find stored procedure ''master.dbo.sp_getapplock
In the source code you sent me the problem was solved.
Thank you very much
Thank you very much