Hi,
I am trying to use ADODB objects to access an ACCESS 2000 db from VB.

I am using the following code:
(I should tell you that the command and recordset objects have been initialized and connected accordingly. I have used all these objects elsewhere in the code without problem. The names of the Command and Recordset objects show which are related.)


objArchCMDLocal.CommandText = _
"SELECT * FROM PdbJobInfo WHERE AutoKeyas < 0"
objArchRSLocal.Requery
'
strSql = "SELECT * FROM PdbJobInfo WHERE JobId = " & CurJobId(0)
'
objActCMDLocal.CommandText = strSql
objActRSLocal.Requery
'
If Not objActRSLocal.EOF then
NumFields = objActRSLocal.Fields.Count
'
Do While Not objActRSLocal.EOF
objArchRSLocal.AddNew
'
for Ndx = 0 to (NumFields - 1)
Field = objActRSLocal(Ndx).Name
Value = objActRSLocal(Ndx).Value
If Field = "JobId" then
objArchRSLocal(Field) = CurJobId(1)
ElseIf Field = "AutoKey" then
'objArchRSLocal(Field) = 1
else
objArchRSLocal(Field) = Value
End If
next
'
objArchRSLocal.Update
objActRSLocal.MoveNext
Loop
'
End If




I have also attempted to use direct access (below) in place of the for loop through the fields...


objArchRSLocal.Fields("JobId").Value = CurJobId(1)
objArchRSLocal.Fields("Variable").Value = _
objActRSLocal.Fields("Variable").Value
objArchRSLocal.Fields("StrVal").Value = _
objActRSLocal.Fields("StrVal").Value
objArchRSLocal.Fields("VarType").Value = _
objActRSLocal.Fields("VarType").Value






When the Update is hit, I always get:
"[Microsoft][ODBC Microsoft Access Driver]Invalid descriptor index "


The table being accessed contains the following fields:
1) AutoKeyVal (auto increment - key value)
2) JobId (int)
3) Variable (text)
4) StrVal (text)
5) VarType (Byte)

The two different Recordsets refer to different databases. The db's have matching tables with identical fields. And there is data is the objActRSLocal recordset.

I am totally out of ideas... anyone got any suggestions?

Thanks...
-Bill