>Using ODBC I can update data from ASP. But whenever I try to use VFPOLEDB instead I get :
>'Cannot update the cursor' && If used with 'insert into ...'
>or :
>'Recordset doesn't support update. ...' && If used Addnew and update.
>As if it's readonly (or does really provider doesn't support updates from ASP?). I couldn't find much documentation about VFPOLEDB.
>
>I should be missing a very basic thing. Simply cannot see it. I've already tried connection.mode = adReadWrite, "Provider ... Mode=ReadWrite;", adUseClient,adUseServer, KeySet, ForwardOnly,Dynamic, Static adLock BatchOptimistic, Optimistic, Pessimistic combinations. Any help is appreciated. TIA.
>Cetin
This is the ASP code that I am using in one of my examples to update VFP data using the OLE-DB provider that comes with VFP 7.
' Connect to our VFP database
set oConnection = Server.CreateObject( "adodb.connection" )
oConnection.Provider = "vfpoledb.1"
oConnection.ConnectionString = "data source=c:\glgdw_web\data\tastrade.dbc"
oConnection.Open
' Update record indicated in txtCustID.
dim cSQL
cSQL = "update customer " &_
"set " &_
"company_name = '" & Request.Form( "txtCustName" ) & "', " &_
"contact_name = '" & Request.Form( "txtCustContact" ) & "' "&_
"where " &_
"customer_id = '" & Request.Form( "txtCustID" ) & "'"
oConnection.Errors.Clear
oConnection.Execute cSQL
' Close everything
oConnection.Close
set oConnection = nothing
Hector Correa