Page 1 of 1

Error: The metadata could not be determined...

Posted: Thu 30 Oct 2014 08:09
by tutko
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

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

Posted: Fri 31 Oct 2014 09:33
by azyk
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 .