FieldByName('Value').AsVariant Get "Invalid Variant Type"
Posted: 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:
quTemp.FieldByName('Value').AsVariant
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
			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:
quTemp.FieldByName('Value').AsVariant
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