MyODBC and MySQL status variables

MyODBC and MySQL status variables

am 24.10.2005 08:23:44 von Daniel Kasak

Greetings.

After upgrading to MySQL-4.1 and MyODBC-3.51.12, a nice little piece of
code that used to grab MySQL status variables doesn't work.

The code:

Private Sub Form_Timer()

Dim myconn As ADODB.connection, myset As ADODB.Recordset, statustxt As
String

Set myconn = New ADODB.connection
With myconn
.ConnectionString = MySQLconn
.Open
End With

Set myset = New ADODB.Recordset
With myset
.ActiveConnection = myconn
.CursorLocation = adUseServer
.CursorType = adOpenStatic
.Open "show status like 'Connections'"
statustxt = "MySQL stats: Connections {" & myset("Value") & "}"
.Close
.Open "show status like 'Open_tables'"
statustxt = statustxt & " Open Tables {" & myset("Value") & "}"
.Close
.Open "show status like 'Questions'"
statustxt = statustxt & " Questions {" & myset("Value") & "}"
.Close
.Open "show status like 'Com_insert'"
statustxt = statustxt & " Inserts {" & myset("Value") & "}"
.Close
End With

myconn.Close

Set myset = Nothing
Set myconn = Nothing

StatusBarMsg (statustxt)

End Sub

Instead of getting values, I'm getting question marks. If I run the
'show status like ...' query from the mysql command-line client, I get
the expected values.

Obviously this is low-priority - I'm just updating the status bar - it
can wait. Should I submit a bug report?

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak@nusconsulting.com.au
website: http://www.nusconsulting.com.au

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org