This segment of code gives me the follow error:
'fgrGaran' is FlexiGrid Control and 'rsFianza' is an ADO 2.1 recordset.
Run-time error '-2147467259 (800004005)':Code:Cn.ConnectionString = "DSN=CapCont21;UID=;PWD=;OLE DB Services=-1;" Cn.Open Cn.CursorLocation = adUseClient With fgrGaran For X = 1 To rsFianza.RecordCount rsFianza.AbsolutePosition = X .Col = 0: rsFianza!concepto = .Text .Col = 1: rsFianza!numfianz = .Text .Col = 2: rsFianza!importe = Val(Format(.Text, "####.##")) .Col = 3: rsFianza!afianzad = .Text .Col = 4: If VBDateVal(.Text) Then rsFianza!ffianza = DateVBToFox(.Text) .Col = 5: If VBDateVal(.Text) Then rsFianza!fini = DateVBToFox(.Text) .Col = 6: If VBDateVal(.Text) Then rsFianza!ffin = DateVBToFox(.Text) rsFianza.Update Next End With
Insufficent or incorrect key information; too many row affected by update.
When I used RDO this code works perfectly.
Any idea?
Thanks!
Ulises


Reply With Quote