Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.0.3
-
None
-
Windows server 2012 R2
Description
ODBC connector 3.0.3 returns always value 0 for decimal fields when accessed via ADODB with clientside cursor when decimal field is after longtext field in select clausule .e.g:
vb6 code
set conn = new ADODB.Connection
set rs = new ADODB.Recordset
rs.CursorLocation = adUseClient
conn.Open "DRIVER=
;SERVER=...;DATABASE=...;UID=...;PWD=...; OPTION=3;"
conn.execute "create table aaa(nm_price decimal(20,4), m_comment longtext)"
conn.execute "insert into aaa values(123.45, 'xxx')"
rs.Open "SELECT m_comment, nm_price from aaa", conn, adOpenForwardOnly, adLockReadOnly
MsgBox rs.Collect("nm_price") ' = 0 - ERROR
rs.Close
rs.Open "SELECT nm_price from aaa", conn, adOpenForwardOnly, adLockReadOnly
MsgBox rs.Collect("nm_price") ' = 123.45 - OK
rs.Close
set rs=nothing
conn.execute "drop table aaa"
conn.Close
set conn = nothing
Thank you for your report.
So, if longtext field follows decimal in the columns list, or if the field of any other type would precede decimal field, everything would be fine?
Also, I would appreciate if you could provide here ODBC trace.