ADO update to VFP database



Hello,

I'm attempting to connect to a Visual FoxPro database and make an update.
I'm able to make the connection but whenever I attempt to make the edit I get
the following error:

Current Recordset does not support updating. This may be a limitation of
the proivder, or of the selected locktype

This is a 3rd party VFP8.0 database. Its seems like the record locktype is
being ignored. Any sugestions? Here is the code i'm executing:

Dim cnn1 As ADODB.Connection
Dim rstNote As ADODB.Recordset
Dim strCnn As String
Dim sql As String



Set cnn1 = New ADODB.Connection
strCnn = "Provider=vfpoledb.1;" & _
"DSN=sbt"
cnn1.Open strCnn

Set rstNote = New ADODB.Recordset
Set rstNote.ActiveConnection = cnn1
rstNote.CursorType = adOpenKeyset
rstNote.LockType = adLockOptimistic

sql = "SELECT itmmemo " & _
" FROM icitem01 WHERE Item = 'HF02-008-ELLI '"

rstNote.Open sql

ERROR OCCURS ON THIS STATEMENT
rstNote!itmmemo = "test"

Thanks in advance.


.



Relevant Pages

  • Re: Help Getting .RecordCount from Stored Proc
    ... I am using VB 6 to execute a stored proc, ... I created a connection, command, and recordset with ADO. ... > Dim cnn1 As ADODB.Connection ... > Dim cmdProvider As ADODB.Command ...
    (microsoft.public.vb.database.ado)
  • Re: Using a command object as source for recordset
    ... Dim cnn1 As ADODB.Connection ... Dim cmdByRoyalty As ADODB.Command ... ' Open command object with one parameter. ... ' Create recordset by executing the command. ...
    (microsoft.public.vb.database.ado)
  • RE: ADO update to VFP database
    ... Try it with a command object instead of a recordset object: ... Dim cmd As New ADODB.Command ... > Dim cnn1 As ADODB.Connection ...
    (microsoft.public.data.ado)