The following code returns an empty recordset, but the mysql statement works fine on the server.
Form1.List1.Clear
OpenDB
recordset.ActiveConnection = conn
recordset.Source = "SELECT postingid, posting_jobid,
postingdate, postingshift, postingexpiration,
postingparttime, postingtemp From job_postings;"
recordset.Open
While recordset.EOF = False
'dummy vars for display in listbox only
dummyid = Left(recordset("postingid"), 15)
dummytitle = Left(recordset("jobtitle"), 25)
'display in listbox using dummyvars
Form1.List2.AddItem dummyid & Space(20 -
Len(dummyid)) & dummytitle & Space(25 -
Len(dummytitle))
recordset.MoveNext
Wend
OpenDB is a function that has been tested and works properly. conn is established as well as recordset. This code is copy and pasted from a working function. The only thing changed is the sql statement.
Form1.List1.Clear
OpenDB
recordset.ActiveConnection = conn
recordset.Source = "SELECT postingid, posting_jobid,
postingdate, postingshift, postingexpiration,
postingparttime, postingtemp From job_postings;"
recordset.Open
While recordset.EOF = False
'dummy vars for display in listbox only
dummyid = Left(recordset("postingid"), 15)
dummytitle = Left(recordset("jobtitle"), 25)
'display in listbox using dummyvars
Form1.List2.AddItem dummyid & Space(20 -
Len(dummyid)) & dummytitle & Space(25 -
Len(dummytitle))
recordset.MoveNext
Wend
OpenDB is a function that has been tested and works properly. conn is established as well as recordset. This code is copy and pasted from a working function. The only thing changed is the sql statement.