469,610 Members | 1,554 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

How to use SQLBindParameter for double or float datatype

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
0 2281

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Bj?rn Terje Svennes | last post: by
4 posts views Thread by Michael Mair | last post: by
8 posts views Thread by abdul_n_khan | last post: by
60 posts views Thread by Erick-> | last post: by
reply views Thread by Terry Reedy | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.