Information générale
Catégorie:
Codage, syntaxe et commandes
I have a project in which I use a datagrid to view a disconnected recordset from a Foxpro table with the following code:
Set cn = New ADODB.Connection
cn.Open "SourceType=DBF;SourceDB=c:\activity;Driver={Microsoft Visual FoxPro Driver}"
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open "select Division as Dept, activity as Item, Descript as Description, unit_price as Price, Units as Unit, quote as Quoting_guidance where del = 0 from activity order by Dept group by Descript", cn, adOpenStatic, adLockBatchOptimistic
rs.ActiveConnection = Nothing
cn.Close
Set DataGrid1.DataSource = rs
My problem is that when I want to update the info, I get an error. I re-open the connection and use use rs.UpdateBatch to make the update, and the error consists of
"not enough base table information to perform an update" or someting quite similar. Any suggestions?
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement