Best method Connecting from VB6

I'm currently working on a project that is going to read/write lot of data into a SQL EXPRESS 2005.

What isBEST WAY(faster and reliable) for connecting, reading, writing updatingfrom VB6...

The code below is working except theRecordCount that always returns -1

I've tried to do a Movelast before, doing so produce this error --> rowset does not support fetching backward

Private ObjConn As New ADODB.Connection
Private ObjRS As New ADODB.Recordset

...

in a function....
Dim i As Integer, j As Integer

With ObjConn
.ConnectionTimeout = 30
.CommandTimeout = 30
.Provider = "SQLOLEDB"
.ConnectionString = "Driver={SQL Native Client};Server=MACHINE\SQLEXPRESS;Database=DSD;UID=sa;PWD=MYPass;"
End With
ObjConn.Open
strRequest = "SELECT * FROM dbo.Site"
ObjRS.Open strRequest, ObjConn
j = 0
MsgBox ObjRS.RecordCount' How to get NUMBER OF RECORDS BEFORE LOOPING ?

Do While Not ObjRS.EOF
task(j).SiteID = ObjRS.Fields(ObjRS.Fields(0).Name).Value
' THIS SECTIONS WORKS
ObjRS.MoveNext

j = j + 1
Loop
ObjConn.Close
test = task
End FunctionThanks for helping ! I'm stuck in the middle...

[1464 byte] By [Floydus] at [2007-12-24]
# 1

Please see the posting at the top regarding vb6 questions.

ReneeC at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...