Hi Folks,

I want write a windows application that would allow other windows applications to work with AS400 data (read and write). I decided to use ADO w/VB 6.0 instead of ADO.NET due to lack of availability of documentation and failure of several tests.

So far, I have been successful at fetching data from AS400 and updating it using a connected recordset with cursor location set to server (CursorLocation = adUseServer).

However, I would like to use disconnected recordset w/location set to client. Here is the problem: AS400 system doesn't run DB2, but is used as a flat file storage, and I have no metadata about the tables (somehow files are organized as tables). However, applications using this tool will know about the metadata of the tables they work with. In the code below, as soon as I change adUseServer to adUseClient, it fails on Update and throws an error:

Run-time error '-2147467259(80004005)':
Insufficient base table information for updating or refreshing


Public Function GetData() As adodb.Recordset

Dim adoCnxn As New adodb.Connection
Dim adoCmd As New adodb.Command
Dim adoRecSet As New adodb.Recordset

'adoCnxn.CursorLocation = adUseServer
adoCnxn.ConnectionString = m_strConn
adoCnxn.Open (m_strConn) 'required

With adoCmd
.CommandText = m_strCmd
.CommandType = adCmdText
.ActiveConnection = adoCnxn
.Properties("Updatability") = 1 + 2 + 4
'excluding Properties setting doesn't change anything
'supposedly it is to tell IBM to enable delete, modify, insert
End With

adoRecSet.CursorType = adOpenKeyset
adoRecSet.LockType = adLockOptimistic
adoRecSet.ActiveConnection = adoCnxn
adoRecSet.CursorLocation = adUseClient
------------->'adUseServer works just fine

adoRecSet.Open adoCmd

adoRecSet.Update "MID", "AP" 'update field called MID
-------> fails right here on Update

Set GetData = adoRecSet
End Function

Please help!!