Re: Returning Null value instead of contents of field

From: Stephen Howe (stephenPOINThoweATtns-globalPOINTcom)
Date: 02/23/05


Date: Wed, 23 Feb 2005 14:14:00 -0000

1) First, even though you request a adOpenForwardOnly cursor for rs2, you
will only ever get back a adOpenStatic cursor because for client-sided, that
is all ADO supports.
Try printing the CursorType _AFTER_ a successful Open

2) This is suspect for a Forward-Only Server-sided cursor:

> If Not (rs1.EOF And rs1.BOF) Then
>
> Call PrintResults(rs1)
> Call PrintResults(rs1)
> End If

If rs1.BOF is True but rs1.EOF is False your code above will call
PrintResults()
But if rs1.BOF is True, you are not on any record, a MoveNext() is required.

Try instead

If Not rs1.EOF Then
    If rs1.BOF Then rs1.MoveNext() 'Not even on first record, advance
End If

If Not rs1.EOF Then
    Call PrintResults(rs1)
    Call PrintResults(rs1)
End If

Stephen Howe