Connect to AS400 using ODBC

Hi,

I connect to AS/400 from my Lotus Domino application using the ODBC connection method (client access driver) and I want to update records in a file on the AS /400.

The problem is that while the select statement is being executed successfully an update statement does nothing.

Here is my code.

Sub as400_results

Dim session As New NotesSession

Dim con As  ODBCConnection

Dim qry As  ODBCQuery

Dim result As ODBCResultSet

	

Set db = session.CurrentDatabase	



Set con = New ODBCConnection

Set qry = New ODBCQuery

Set result = New ODBCResultSet

Set qry.Connection = con

Set result.Query = qry



If Not con.ConnectTo(datasource$,usr$ ,pws$) Then

	Messagebox "Could not connect to " + datasource$

	Exit Sub

End If



qry.SQL = "SELECT FIELD1 FROM LIBRARY.FILE"

result.Execute



result.LastRow



For  i = 1 To result.NumRows

	result.CurrentRow = i

	Call result.SetValue("FIELD1", "USD")

	result.UpdateRow

Next

result.Close(DB_CLOSE)

con.Disconnect	

End Sub

Please note that my profile in the AS 400 has the full access in that file.

I have also tested the above code to update records in MS Access database and it worked fine.

Do you have any idea where is the problem?

Subject: Connect to AS400 using ODBC

You would be better off using JDBC on the iSeriesit is more stable and faster

Subject: RE: Connect to AS400 using ODBC

Sorry, Im not familiar with Java.Any help?