geeting error while storing decimal values from ADO

abhishekpareekabhishekpareek Member Posts: 150
Hi All,

I am using the ADO connection to get the values for qty to receive and qty to invoice values from sql database.

Please see the lines of code below::
ADOStreamP.Open;
ADOStreamP.WriteText(ADORecSetP.Fields.Item('Qty_ to Receive').Value);
ADOStreamP.Position:= 0;
FieldValueP:= ADOStreamP.ReadText;
ADOStreamP.Close;
EVALUATE(qtytoreciveP,FORMAT(FieldValueP));

It is running successfully by using streams objects but I do not want to use streams.
Without using the stream I am writing the following code :

EVALUATE(qtytoreciveP,FORMAT(ADORecSetP.Fields.Item('Qty_ to Receive').Value));
recpurchline.VALIDATE("Qty. to Receive",qtytoreciveP);

by running the above code it is throwing error.
Error is as follows:
this message for c/al programmers:

this data type is not supported by c/side.you can access data from any of the folloing data types:vT_void,VI_I2,VT_I4,VT_R4,VT_R8,VT_CY,VT_DATE,VT_BSTR and VT_BOOL

It would be great if anybody could give light on the problem.

Regards,
Abhishek

Comments

  • garakgarak Member Posts: 3,263
    viewtopic.php?f=23&t=32375

    search the forum also for CAST and ADO
    Do you make it right, it works too!
  • abhishekpareekabhishekpareek Member Posts: 150
    Thanks for the reply!
    I am not accessing the records through select statement.Instaed I am using the recordset and from recordset I am accessing the field qty to receive and qty to invoice from sql table.
    I f I am accessing thorugh ADO stream then I am not getting the error but if I am directly assiging the value from recordset to decimal variable in navision I am getting the error.

    Regards,
    abhishek
Sign In or Register to comment.