ADO Null Fields 
Author Message
 ADO Null Fields

Hi,

By default OLEDB JET provider caches changes to database
in memory for 5 secs. In that case if you will try to
retrieve data just after you insert them into database,
then you will not get proper result. Try to make changes
in database using transactions, to reflect all changes
immidiately

Val

Quote:
>-----Original Message-----
>Hello all,

>This is a perplexing problem.  First, it is intermittent
>so I am having a hard time figuring out why this happens.

>I have a data entry form based on a DataControl and a
>Grid.  The control and grid are hidden.  The user
>populates the text boxes on the form and clicks ok.  The
>values in the form are then passed to the grd and it
>updates the Access table then closes the form.  I then
>print reports.  One is a DataReport and the other uses
the
>Printer Object. Sometimes the data is there and all is ok
>but sometimes the information does not appear on the
>reports.  On the report with the Printer Object it prints
>the word Null.  I can look at the Access DB and all the
>data is where it should be.  It seems that if I wait for
a
>short while then the data will print but this is not
>consistent.  I added a do while loop and a flag to try to
>capture the RecordUpdateComplete event but the problem
>persists.  Here is the code for the OK button that runs
>this.  Thanks for the assist.

>Mike

>Private Sub cmdOK_Click()
>Flag = 0
>Me.DataGrid1.Columns("PM_SHIP_TO_1").Value = txtCustomer
>Me.DataGrid1.Columns("PM_SHIP_TO_2").Value = txtAddress
>Me.DataGrid1.Columns("PM_SHIP_TO_3").Value = txtCity
>Me.DataGrid1.Columns("PM_SHIP_TO_4").Value = txtState
>Me.DataGrid1.Columns("PM_SHIP_TO_5").Value = txtZip
>Me.DataGrid1.Columns("PM_MARK_1").Value = txtRem1
>Me.DataGrid1.Columns("PM_MARK_2").Value = txtRem2
>Me.DataGrid1.Columns("PM_MARK_3").Value = txtRem3
>Me.DataGrid1.Columns("PM_DATE").Value = txtDate
>Me.DataGrid1.Columns("PM-SHIP-VIA").Value _
>     = dcboShipVia.Text 'txtShipVia
>Me.Adodc1.Recordset.Update
>vStart = Now()
>Do While Flag = 0
>    If DateDiff("s", vStart, Now()) > 20 Then
>        Exit Do
>    End If
>    DoEvents
>Loop
>Unload Me

>End Sub  
>.



Mon, 06 Sep 2004 20:30:44 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ADO Problem Updating number field to Null

2. ADO - how to test for empty(null) fields in a recordset

3. ADO and NULL field values

4. Oracle database Ado recordset insert null into numeric field

5. VB6 - MSSQL Server 7 - ADO - Assigning NULL to field in RecordSet object

6. VB 6/ADO 2.1/JET- Copying NULL fields across recordsets causes error 80040e21

7. ADO and Null Field Values

8. VB6 - MSSQL Server 7 - ADO - Assigning NULL to field in RecordSet object

9. VB 6/ADO 2.1/JET- Copying NULL fields across recordsets causes error 80040e21

10. Set Databound ADO Field to Null (VB6)

11. How to update datetime field with NULL using ADO update

12. Reading NTEXT fields in VB6 SP5/ADO 2.5 gives nulls

 

 
Powered by phpBB® Forum Software