[ODBC-52] Use recordset and return Invalid string or buffer length when the value is '' (not null) Created: 2016-09-05  Updated: 2016-09-07  Resolved: 2016-09-07

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: None
Affects Version/s: 2.0.11
Fix Version/s: 2.0.12

Type: Bug Priority: Major
Reporter: Su, Jun-Ming Assignee: Lawrin Novitsky
Resolution: Duplicate Votes: 0
Labels: None
Environment:

Windows 2008 R2 64 bits, IIS 7.5, ASP Classic
MariaDB 10.1.16



 Description   

There is a simple schema "test", and a table "testtable", and there is only column "testc" for char(10).

There is only one row in test.testtable, and the value is '' (not null)

when the asp use recordset to retrive the row for test,testtable,like this
sql = "select testc from test.testtable"
ds = conn.execute(sql)

it always return
[ma-2.0.11][mariadb-10.1.16] Invalid string or buffer length

I need to change the sql statement to
sql = "select (case testc when '' then NULL else testc end) as testc from test.testtable"
ds = conn.execute(sql)

It can be worked, why doesnt return '' for this case?

Thanks.



 Comments   
Comment by Lawrin Novitsky [ 2016-09-05 ]

Thank you for your bug report!

Most probably it is a duplicate of ODBC-51, but I will have to verify that

Comment by Su, Jun-Ming [ 2016-09-05 ]

Thank you, I had seen the ODBC-51, and there is no comment for the values for table, maybe the same as me, for the values which is '', not null.

Comment by Lawrin Novitsky [ 2016-09-07 ]

I have verified that is duplicate of ODBC-51

Generated at Thu Feb 08 03:25:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.