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:
00584145
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
I am not doing SQL-Updates (yet), but I am taking a DBC, creating a table from scratch, altering it, and inserting a little over one million rows in a VBScript file. Here's an excerpt of relevant code from my spaghetti:
Set oCacheConn = CreateObject("ADODB.Connection")
With oCacheConn
  .ConnectionString = "Provider=VFPOLEDB.1;Data Source=" & cCacheDir & cDestDB
  .CursorLocation = 2 ' adUseServer
  .Mode = 16 ' adModeShareDenyNone
  .Open
End With
cExec = "Alter Table " & cVFPTable & " Add Column " & cNuColName & " " & cColType & "(" & cColWidth & ")"
oCacheConn.Execute(cExec)
cExec = "Insert Into " & cVFPTable & " (" & cColSpec & ") Values (" & cVals & ")"	'WScript.Echo cExec
oCacheConn.Execute(cExec)
This is running fine for me every day. I don't see why an update would fail if insert is working, but you never know. I don't use recordsets when querying (I use GetRows() into an array) or updating (I would build an insert string), so maybe that is why I am not seeing issues that others do.

HTH.
Previous
Reply
Map
View

Click here to load this message in the networking platform