1. First Recordset.AddNew Doesn't Appear in Grid
I'm using VB6 Enterprise. I have a DataGrid Connected to an adodc that I'm
calling adcEvents, which is in turn connected to an Access 97 database table
called Events. I'm just working with one table.
First I empty the table using
Dim dbEvents as Database
Set dbEvents = Workspaces(0).OpenDatabase("LeavTrak.mdb")
dbEvents.Execute "DELETE * FROM Events"
adcEvents.Refresh
which only sometimes results in the data being emptied from the grid.
Then I start adding data to the table using
adcEvents.Recordset.AddNew
adcEvents.Recordset!Code = txtEventCode.Text
adcEvents.Recordset!Date = Calendar1.Value
adcEvents.Recordset!Hours = txtHours.Text
adcEvents.Recordset.Update
adcEvents.Refresh
but, strangely, the first row added never shows in the grid. Only starting
with the second AddNew does the data start appearing in the grid. Why is
this?
2. Sybase FAQ: 13/13 - section 12
3. AddNew method doesn't work right!!
4. database connection problem ??
5. AddNew works, but then it doesn't (ADO)
6. load table from file with field header? (sql anywhere 5.5, WinNT)
7. Doesn't support AddNew Method
9. Addnew Doesn't Add New - It is being ignored
10. AddNew with ADO Recordset doesn't seem to work
11. Addnew works but doesn't...
12. AddNew on an empty Recordset fails in MS C++ AddNew Example
13. MultiUser Database DAO - 'Addnew'