RE: ADO update to VFP database
- From: "Rich" <Rich@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 25 Aug 2005 14:42:23 -0700
Try it with a command object instead of a recordset object:
Dim cmd As New ADODB.Command
cmd.ActiveConnection = "Provider=vfpoledb.1;DSN=sbt"
cmd.CommandTimeout = 600
cmd.CommandType = adCmdText
cmd.CommandText = "Update tblx Set itmmemo = 'something' WHERE Item =
'HF02-008-ELLI '"
cmd.Execute
cmd.ActiveConnection.Close
HTH
Rich
"franky" wrote:
> 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.
>
>
.
- References:
- ADO update to VFP database
- From: franky
- ADO update to VFP database
- Prev by Date: Problem creating a populated ado recordset
- Next by Date: Re: Problem creating a populated ado recordset
- Previous by thread: ADO update to VFP database
- Next by thread: ADO provider for Oracle which supports AbsolutePage property
- Index(es):
Relevant Pages
|
|