By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,652 Members | 1,337 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,652 IT Pros & Developers. It's quick & easy.

How to use SQLBindParameter for double or float datatype

P: n/a
Hallo!

I have a problem using SQLBindParameter for columns of datatype DOUBLE
or REAL.

e.g. I have an insert statement where i wan't to insert the value 100.10
into a DOUBLE column.
For the source type of SQLBindParameter I need to use SQL_C_CHAR.
What type does I need to set ParameterType, I have tried SQL_VARCHAR and
SQL_DOUBLE with the same result:

If the value uses ',' as decimal separator everything works fine, but
when I use '.' as decimal separator I get the error
[IBM][CLI Driver] CLI0112E Zuordnungsfehler. SQLSTATE=22005

In case of a DECIMAL column, I think the driver works correctly, because
after calling SQLExecDirect the buffer for the value has changed from
e.g. '10,02' to '10.02' so for this type i can use both decimal separators.

But I need to use '.' as decimal separator for DOUBLE and REAL columns.

How can I do this?

thanks
andreas
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.