Hello,
our software in developped in VB6 using ADO components.
When we use a recordset to create new records we sometimes realize
that the new records do not appear immediately in the database.
Is there a way to force the ADO component to immediately write to the
database ?
To my experience, one possible way is to use SQL commands to write to
the database but to change to this in every case we insert to the
database by recordset is too difficult .
Because of ADO not suddenly writting to the database, a check for
double entries in the database fails causing some trouble.
Here is an example on how we write to the table using ADO
Me.AdodcHeader.Recordset.AddNew
Me.AdodcHeader.Recordset!anz_pos = 0
Me.AdodcHeader.Recordset!Ausleiher = isUcase(Trim(NZ(GBenuID)))
Me.AdodcHeader.Recordset!AusleiherAbteilung =
isUcase(Trim(NZ(GDepartment)))
Me.AdodcHeader.Recordset!Status = "w"
..............
Me.AdodcHeader.Recordset.Update
This check for double values sometimes failed and caused trouble
Set temprs = DataDB.Execute("select * from Orderheader where
auft_nr='" & isUcase(Trim(NZ(Me.TextListeName.Text))) & "'")
If Not temprs.EOF Then
temprs.Close
MsgBox
Me.IvFileDictionary1.IvFormat.FormatStr(Me.IvFileDictionary1.Translate("mes Many thanks in advance for your help, Regards, Bernd
Me.TextListeName.Text)
Me.TextListeName.SetFocus
Else
temprs.Close