How to extract data from a DB2 table #2

OBJETIVE: I want to extact information from a DB2 table (no insertion to DB2 is required) vía LS and convert it into notes document and save them in a NotesDatabase.

CONTEXT: I have already done a LS that connects to a DB2 server vía ODBC using “ODBCConnection”, “ODBCQuery” and “ODBCResultSet”.

PROBLEM: no rows returned from DB2.

QUESTIONS and DOUBTS:

1- The SQL statement I should run is → “SELECT * from dbo.InterfaceLotusNotes”. (dbo = database, InterfaceLotusNotes = table with registers. The syntaxt is OK?.

2- The number of registers to extract to is 5000. Is it the apropiated way to do this task?

3- Some comments, links, etc. would be apreciatted.

CODE: Here is my code:

Dim session As New NotesSession

Dim db As NotesDatabase

Dim con As ODBCConnection

Dim dataSource As String

Dim userName As String

Dim password As String

Dim odbcQuery As New ODBCQuery

Dim odbcResultSet As New ODBCResultSet



Set con = New ODBCConnection

dataSource = "DBPTOSD"

userName = string

password = string

con.ConnectTo(dataSource,userName, password)

Set odbcQuery.Connection = con

odbcQuery.SQL = "SELECT * from dbo.InterfaceLotusNotes"

Set odbcResultSet.Query = odbcQuery

status = odbcResultSet.Execute

con.Disconnect

Subject: How to extract data from a DB2 table #2

Check the status returned by the execute and see what it says. Maybe there is an error in the execution of the query?

Subject: RE: How to extract data from a DB2 table #2

The status es TrueThanks for your comment

Any other suggestion would be appreciatted.

Juan