I have the following code in a form that tries to take data from two tables connected by a LEFT JOIN and write the results to a text file. If I run the query in MySQL Query Browser it works as expected. For test purposed only I ran the query selectying data from 1 table only (LEFT JOIN redundant I know but trying to see if there was a syntax issue) and it worked as expected. Am I missing something in trying to run this query from inside a VBasic Express form.
Dim myQuery As String
myQuery = "SELECT utName, utRating, ulTotSeconds FROM usrtime u "
myQuery = myQuery & "LEFT JOIN usrList l "
myQuery = myQuery & "ON u.utName = l.nameWeb "
myQuery = myQuery & "WHERE ASCII(u.utName) > 64 "
myQuery = myQuery & "ORDER BY u.utName"
Dim myConn As New MySqlConnection(connStr)
Dim myCmd As New MySqlCommand(myQuery, myConn)
Dim myReader As MySqlDataReader
myReader = myCmd.ExecuteReader()
objWrite.WriteLine((myReader.GetString(0) & ", " & _
myReader.GetString(1) & ", " & myReader.GetString(2)))