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
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