Click to See Complete Forum and Search --> : Updating FoxPro table using ADO


rocket
October 22nd, 2004, 12:50 PM
I have Foxpro tables that I'm trying to edit/add to but I keep getting an error "Current record does not support updating. This may be a limitation of the provider, or of the selected locktype."
It allows me to select records and read records, but does not allow edits or adds. I've tried all 4 Locktypes in combination with all 4 CusorTypes available, but keep getting the same error.

I'm using VB6 with and ADO connection to FoxPro 8.0. Any ideas on what I'm doing wrong? I've already checked the persmissions and have Full control set for the database and all the tables.


'-- Code
m_dbObjectDB.Mode = ADODB.ConnectModeEnum.adModeReadWrite
m_dbObjectDB.Open "Provider=VFPOLEDB.1;Data Source=c:\Mydatabase.dbc;SourceType=dbf;BackgroundFetch=Yes;Deleted=Yes;Mode=ReadWrite|Shar e Deny None;" _
& "Extended Properties="""";User ID="""";Password="""";Mask Password=False;" _
& "Cache Authentication=False;Encrypt Password=False;Collating Sequence=MACHINE"

m_rsObjectRS.ActiveConnection = m_dbObjectDB
m_rsObjectRS.Open "SELECT * FROM Customer", m_dbObjectDB, adOpenKeyset, adLockOptimistic, adCmdText

spuppett
November 5th, 2004, 08:30 AM
I'm getting that too. Have you found or heard of a solution???

jp140768
November 10th, 2004, 09:26 AM
A website I found with connection string examples, gave the following:

oConn.Open "Provider=vfpoledb;" & _
"Data Source=C:\vfp8\Samples\Data\myVFPDB.dbc;" & _
"Mode=ReadWrite|Share Deny None;" & _
"Collating Sequence=MACHINE;" & _
"Password=''"

The difference between it and yours is, that it specifies the Mode (ReadWrite etc). Have you tried your string with the mode added?

HTH

spuppett
November 15th, 2004, 08:12 AM
I finally had a chance to try out the code above, but kept getting the same error. I had high hopes for that, but alas. Thank you for your input, and if anyone has a solution, or possible solution, by all means, feel free to post.

Thank you

Vanaj
November 16th, 2004, 03:53 AM
Try looking at the examples at

www.connectionstrings.com

This should help...

spuppett
November 16th, 2004, 07:15 AM
Thats where I got my original connection string that didn't work. Thanks though.

roilld
July 8th, 2005, 10:20 AM
hello friends, I have the same problem, I can connect to the foxpro database but I cannot modify neither to add. the error that gives me is the same, I believe that the problem is with the Provider. was some of you able finally to solve the problem?