Subject: Recordset
Posted By: KennethMungwira Post Date: 1/12/2004 2:30:22 PM
Dear Users

my recordset returns a (-1) why does this happen if I know that there are no records present? (adoRS = -1)

Dim rs As ADODB.Recordset = New ADODB.Recordset()
        Dim adoRS As Recordset = New Recordset()
        adoRS.Open(strSQL, adodbConnection, CursorTypeEnum.adOpenForwardOnly, LockTypeEnum.adLockReadOnly, 0)


        If adoRS.RecordCount <> 0 Then
            adoRS.MoveFirst()
        End If
Reply By: planoie Reply Date: 1/12/2004 2:54:04 PM
May I ask why you are using ADODB in .net?  Unless you really really have to, I'd recommend using the new ADO.net classes.  You'll get much better functionality out of them.

Peter
------------------------------------------------------
Work smarter, not harder.

Go to topic 8200

Return to index page 971
Return to index page 970
Return to index page 969
Return to index page 968
Return to index page 967
Return to index page 966
Return to index page 965
Return to index page 964
Return to index page 963
Return to index page 962