Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Has anyone used VFPOLEDB to update data ?
Message
 
To
20/11/2001 09:08:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00583878
Message ID:
00584243
Views:
22
This message has been marked as a message which has helped to the initial question of the thread.
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform