BrianGooch
Programmer
Hi All,
This isolates an explicit failure from my previous TADO posts.
Reminder: Delphi 2009, Firebird 1.5, Win32, driver MSDASQL, Firebird driver ODBC 2.0.0.148.
What is successful:
1. Retrieve from Server system tables SP parameter details via ADOQry1
2. Retrieve USERdata from Server SP via TADOCommand
3. ClientQry for INSERTing USER data: AddParameters from ADOQry1 to ClientQry - datatype, direction (changed from output to input), size,scale, precision, value=nil on creation (but assign 0 for it to work).
The failure occurs next, here:
4. Assign values from TADOCommand.Parameters (output) to ClientQry parameters (input).
Code that works as far as it goes: (a loop)
ClientQry.Parameters.Items.Value:= USERdata.FieldValues(USERdata.Fieldname);
// other combinations of syntax do no get as far as the next step
Parameter.Items[0] is a string which is assigned correctly.
Parameter.Items[1] is an integer which fails with the error message "cannot convert variant of type (OleStr) into type Double".
The assignment fails to continue and only the first parameter value has been assigned.
Apart from the fact that Parameter[1].DataType = ftInteger, Delphi is automatically trying to convert to an unwanted double.
I shall appreciate any comments on this strange event.
Thanking you in advance.
Kind Regards,
Brian Gooch.
This isolates an explicit failure from my previous TADO posts.
Reminder: Delphi 2009, Firebird 1.5, Win32, driver MSDASQL, Firebird driver ODBC 2.0.0.148.
What is successful:
1. Retrieve from Server system tables SP parameter details via ADOQry1
2. Retrieve USERdata from Server SP via TADOCommand
3. ClientQry for INSERTing USER data: AddParameters from ADOQry1 to ClientQry - datatype, direction (changed from output to input), size,scale, precision, value=nil on creation (but assign 0 for it to work).
The failure occurs next, here:
4. Assign values from TADOCommand.Parameters (output) to ClientQry parameters (input).
Code that works as far as it goes: (a loop)
ClientQry.Parameters.Items.Value:= USERdata.FieldValues(USERdata.Fieldname);
// other combinations of syntax do no get as far as the next step
Parameter.Items[0] is a string which is assigned correctly.
Parameter.Items[1] is an integer which fails with the error message "cannot convert variant of type (OleStr) into type Double".
The assignment fails to continue and only the first parameter value has been assigned.
Apart from the fact that Parameter[1].DataType = ftInteger, Delphi is automatically trying to convert to an unwanted double.
I shall appreciate any comments on this strange event.
Thanking you in advance.
Kind Regards,
Brian Gooch.