Problem with bit field using MS Sql server and Turbo Delphi 2006



Hi,

Using ado to connect to this database, I am getting an error when executing a procedure.

EOleException: Error converting data type varchar to bit

There is only one bit field, and it is being set as:

ThisValid : boolean;

if (something) <> 0) then
ThisValid := true
else
ThisValid := false;

Parameters.ParamByName('@gps_validity').Value := ThisValid;


There are lots more parameters than this one in the stored proc.

I noticed that the parameter list did not match the order as defined in the stored proc, so I cleared the list and re added them. Now the list matched the order in the stored proc, and I don't get the error now!

So, is the ADO implementation sensitive to order of the parameters? Could it be that one parameter is stamping on another if the types are not identical?

Any ideas please.

Thanks,

Andy
.



Relevant Pages

  • Re: MSSQL vs. SYBASE
    ... > the stored proc to get any results. ... ADO .Net did just fine, that is I got the result as soon as SQL Server ... cursor, but that is not possible in your case. ...
    (microsoft.public.sqlserver.programming)
  • Re: Very slow access using MDAC2.8
    ... If the performance problem is visible in QA then it likely isn't an ADO ... Would it be possible to locate the stored proc on the machines with the ... > getdate(); statements are just used to time the execution. ...
    (microsoft.public.data.ado)
  • Truncation of Argument with ADo Components
    ... I have encountered and interesting and frustrating problem with the ADO ... when I pass a string argument which is destined for an image ... column in the DB into a parameterised INSERT query, only the first character ... resorting to using a stored proc. ...
    (borland.public.delphi.database.ado)
  • ADO Data type question
    ... and I pass it to the stored proc. ... When I pass it in VB as an ADO parameter, i was using AdChar, ... When I call it using the adVarChar, there is a limitation of 8000 which I ... When I use adLongVarChar, it doesn't work and I don't get an error message. ...
    (microsoft.public.vb.general.discussion)