Page 1 of 1

SqlCommand.Prepare method requires all parameters to have an

PostPosted: October 21st, 2014, 9:51 pm
by davidbcn
I get this error:

SqlCommand.Prepare method requires all parameters to have an explicitly set type.

When trying to Prepare() a query on a PDO object, only if the query has any placeholders in it.

But it is very usual on PHP that you prepare the statement without knowing the type and sizes of the different parameters.

I cannot figure out how to overcome this without having to rewrite every single database call and telling, alonside with the query, what data types de place holders expect to receive.