SQL query is not returning right amount of posts in LotusScript

Hello,

I have an agent that runs every night fetching records from a MySql database. It should contain over 700 records. This returns in Notes only 335 records.

I have loged on to MySQL server and ran the query on the mysql dashboard to see if it was some problem in the database, but no.

Here is the code I’m using:

Set con = New ODBCConnection

dataSource = “Racktables”

Set qry.Connection = con

Set result.Query = qry

If con.ConnectTo(dataSource) Then

qry.SQL = "SELECT * FROM RackObjectHistory where name is not null"

result.Execute

End If

Do

Set doc = db.CreateDocument

doc.Form="Racktable"

hostname = result.GetValue("name")

id = result.GetValue("id")

ctimeString$ = result.GetValue("ctime")

Set ctime = New NotesDateTime(ctimeString$)

Call doc.ReplaceItemValue("commonname", hostname)

Call doc.ReplaceItemValue("id", id)

Call doc.ReplaceItemValue("ctime", ctime)

Call doc.Save(True, False)

		

result.NextRow

Loop Until result.IsEndOfData

This returns only half of the posts in the sql database

Please if someone has any ideas, don’t hesitate to share.

Johan