Error: The metadata could not be determined...

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tutko
Posts: 2
Joined: Wed 08 Jul 2009 15:37

Error: The metadata could not be determined...

Post by tutko » Thu 30 Oct 2014 08:09

Hi

I have a trigger by update, in this trigger a dynamic SQL. (MS SQL Server)

actually tested with UniDAC 5.5.12 I receive the following error message:

The metadata could not be determined because statement 'EXEC SP_EXECUTESQL @vSQL, N'@MandantId int,@DocType smallint,@Serialyear smallint,@Serialnr int,@Doc' in procedure 'SP_UPDATEREFERDOC' contains dynamic SQL. Consider using the WITH RESULT SETS clause to explicitly describe the result set.

With old version of UniDAC 4.1.5 works the update without error (the program remains the same)

the same program (always the same DB) with 5.5.12 from different workstations responds different: in some cases works, in some cases I receive this error

(I can't modify the trigger, I have many similar triggers and stored procedures by many customers)

What happens here? Can somebody help me?

Thanks

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Error: The metadata could not be determined...

Post by azyk » Fri 31 Oct 2014 09:33

To solve the problem, in the dataset properties, set the SpecificOptions.Values['SQL Server.UniqueRecords'] option to 'False'. For example:

Code: Select all

UniQuery.SpecificOptions.Values['SQL Server.UniqueRecords'] := 'False';
If the error is still reproduced, please compose a small test sample, that would be correctly executed in UniDAC 4.1.5, but lead to this error in UniDAC 5.5.12 . Include the database objects creating scripts and send them to andreyz*devart*com .

Post Reply