Bug #25110 recordset doesn't return rows,select with longtext field,ADO,clientside cursor
Submitted: 16 Dec 2006 12:42 Modified: 1 Feb 2007 13:23
Reporter: Marek Srom Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.0.10, DB 5.1.07 beta OS:Windows (Win XP SP2)
Assigned to: Jess Balint CPU Architecture:Any

[16 Dec 2006 12:42] Marek Srom
Description:
in subject and how to repeat, ADO 2.8
with select without longtext field works good, but i don't know if it is the only condition for this bug.

How to repeat:
VB code:

set p_conn=new ADODB.Connection
p_conn.Open "Provider=MSDASQL.1;Extended Properties=""SERVER=localhost;DRIVER=MySQL Connector/ODBC v5 Driver;OPTION=3;PWD=;DATABASE=mysql;UID=root"""

p_conn.Execute "create table t_table(s_name varchar(10),m_value longtext)"
p_conn.Execute "insert into t_table values('a','b')"

set p_rs=new ADODB.Recordset
p_rs.CursorLocation = adUseClient
p_rs.Open "select s_name, m_value from t_table", Connection, adOpenStatic
'returns EOF, BOF instead of 1 row
p_rs.close
set p_ps=nothing
conn.close
set conn=nothing
[31 Jan 2007 1:22] Jess Balint
Marek, This works fine for me given the code shown below. Please verify that you are using a recent version of the driver. The driver string changed from "MySQL Connector/ODBC v5 Driver" to "MySQL Connector/ODBC v5" quite some time ago.

The following code works for me with the recent 5.00.11 release under Visual Studio .NET 2003:

Dim p_conn As New ADODB.Connection
p_conn.Open("Provider=MSDASQL.1;Extended Properties=;SERVER=localhost;DRIVER=MySQL Connector/ODBC v5;OPTION=3;PWD=;DATABASE=test;UID=root")

p_conn.Execute("create table t_table(s_name varchar(10),m_value longtext)")
p_conn.Execute("insert into t_table values('a','b')")

Dim p_rs As New ADODB.Recordset
p_rs.CursorLocation = ADODB.CursorLocationEnum.adUseClient
p_rs.Open("select s_name, m_value from t_table", p_conn, ADODB.CursorTypeEnum.adOpenStatic)
'returns EOF, BOF instead of 1 row
MsgBox(p_rs.Fields(0).Value)
MsgBox(p_rs.Fields(1).Value)
p_rs.close()
p_rs = Nothing
p_conn.close()
p_conn = Nothing
[1 Feb 2007 13:23] Tonci Grgin
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at

  http://www.mysql.com/downloads/

Explanation: Test case works as expected with latest version available.