Ado

accessman2

Registered User.
Local time
Today, 00:54
Joined
Sep 15, 2005
Messages
335
Hi,

I active application role from the SQL Server, then

I open the recordset

rs.open "select .............", conn, adOpenKeyset, adLockReadOnly

and then

Do while Not (rs.BOF or rs.EOF)
conn.Execute("select [path] from
  • where [Name] = 'Tim'").Fields(0).Value
    ...........
    rs.movenext
    loop

    After the recordset is opened, the conn.Execute doesn't work. But, I cannot close it. how can I fix it?
 
Not sure, but if you're trying to cycle through the records, try taking the rs.BOF out of the conditional, and do a rs.MoveFirst right before the loop. You want to start at the BOF and run until the EOF. The way you've written it, it can't run because if it opens at the BOF it will just skip the loop completely.
 

Users who are viewing this thread

Back
Top Bottom