Liam Digman 22.Jan.10 03:27 PM a Web browser Applications Development7.0.2All Platforms
I have been struggling to retrieve data from a mySQL datasource. I know the data is there (verified via query browser) but I never return any data with my query. I have written this stuff many times, but for some reason, I can't get this to work.
I am connecting to the datasource OK, I return -1 rows and the data in my field is 'False'. I have scoured the boards and tried all kinds of things, including having my DBA set up a linked server to SQL Server 2008, but with the same result.
Thoughts?
Thanks!
The code:
Option Public
Option Declare
Uselsx "*LSXODBC"
Dim session As NotesSession
Dim con As New ODBCConnection
Dim qry As New ODBCQuery
Dim result As New ODBCResultSet
Set qry.Connection = con
Set result.Query = qry
con.SilentMode = True
Call con.ConnectTo(DATASOURCE, USERNAME, PASSWORD)
result.CacheLimit = 6000
result.FetchBatchSize = 5000
qry.SQL = "select title, description from wmoodle.mdl_aard_comp_job"
Call result.Execute
If result.IsResultSetAvailable Then
Do
intCount = intCount + 1
result.NextRow
strTitle = result.GetValue(1)
Loop Until result.IsEndOfData
End If