hack123
5/8/2005 1:31:00 PM
G'Day all,
Heres my code:
Dim MyConString As String = "DRIVER={MySQL ODBC 3.51
Driver};SERVER=localhost;DATABASE=phpbb_forums;UID=root;PASSWORD=joeblogs;OPTION=3"
Dim MyConnection = New OdbcConnection(MyConString)
Dim MDBGetRow As New OdbcCommand("SELECT MAX(user_id) FROM
phpbb_users", MyConnection)
MyConnection.Open()
Dim MDBreader As OdbcDataReader
MDBreader = MDBGetRow.ExecuteReader
MessageBox.Show(MDBreader.Read)
MyConnection.close()
Now when I run that all I get in the messagebox.show() is true.
Now the user_id column is all numbers (no text at all) and its
properties are "mediumint". If I execute the sql statement using say
navicat or another sql management program it returns the max number in
the column so I figure it must be something to do with my code. Any
ideas?
Cheers all
Dave.