FieldByName('Value').AsVariant Get "Invalid Variant Type"

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 3
Joined: Fri 03 Feb 2017 15:36

FieldByName('Value').AsVariant Get "Invalid Variant Type"

Post by rezasadigh » Sat 25 Feb 2017 06:26

I have a table with two columns "Name" and "Value" in SQL Server
Name is varchar and Value is sql_variant. I want to get a record and use the simle sql code like this with a TMSQuery
Select [Name], [Value]
From [dbo].[MMDocFields]
Where [MMDocID]=230591 and Name='C11'
every thing is OK and a can read the "value" field by usual comman like this:

Now, I want to use this in a datasnap service but surprisingly when i use in service, it raise an error with message: TDBXError with message RemoteError: Invalid variant type.

I googled but not found any helpful comment.
Can anybody help me?
Win 10
Delphi Seattle update 1
SDAC 6.10.19

Devart Team
Posts: 2057
Joined: Wed 30 Jul 2014 07:16

Re: FieldByName('Value').AsVariant Get "Invalid Variant Type"

Post by ViktorV » Mon 27 Feb 2017 12:21

The specified SDAC 6.10.19 version does not support RAD Studio 10 Seattle.
Please make sure that the issue is reproduced on the latest SDAC 7.3.16 version.
In order to get a detailed answer, please compose a small sample demonstrating the described behavior and send it using the contact form including scripts for creating database objects.

Post Reply