D
Dr.Gizmo
Hello!
How can I generate random recordset name in do while loop, every time
that loop pass my code. example:
do while something
Set dpconn1 = spoj.Execute("SELECT * FROM txt WHERE number = 1")
if not dpconn1.EOF then
Do while not dpconn1.EOF
...
dpconn1.movenext
loop
end if
dpconn1.Close
set dpconn1 = Nothing
loop
so I want that name dpconn1 is different in every loop, for example in
second run it should be called dpconn2, and like that until do while
is not over...
I need this, because I'm calling function inside that same function,
so there would be the same recordset name, example:
function a1()
Set dpconn1 = spoj.Execute("SELECT * FROM txt WHERE number = 1")
if not dpconn1.EOF then
Do while not dpconn1.EOF
'++++this is a1 inside a1
Set dpconn1 = spoj.Execute("SELECT * FROM txt WHERE number = 2")
if not dpconn1.EOF then
Do while not dpconn1.EOF
'next is a1 inside a1, which is inside original a1, and so...
...
dpconn1.movenext
loop
end if
dpconn1.Close
set dpconn1 = Nothing
'++++
dpconn1.movenext
loop
end if
dpconn1.Close
set dpconn1 = Nothing
end function
thanx!
How can I generate random recordset name in do while loop, every time
that loop pass my code. example:
do while something
Set dpconn1 = spoj.Execute("SELECT * FROM txt WHERE number = 1")
if not dpconn1.EOF then
Do while not dpconn1.EOF
...
dpconn1.movenext
loop
end if
dpconn1.Close
set dpconn1 = Nothing
loop
so I want that name dpconn1 is different in every loop, for example in
second run it should be called dpconn2, and like that until do while
is not over...
I need this, because I'm calling function inside that same function,
so there would be the same recordset name, example:
function a1()
Set dpconn1 = spoj.Execute("SELECT * FROM txt WHERE number = 1")
if not dpconn1.EOF then
Do while not dpconn1.EOF
'++++this is a1 inside a1
Set dpconn1 = spoj.Execute("SELECT * FROM txt WHERE number = 2")
if not dpconn1.EOF then
Do while not dpconn1.EOF
'next is a1 inside a1, which is inside original a1, and so...
...
dpconn1.movenext
loop
end if
dpconn1.Close
set dpconn1 = Nothing
'++++
dpconn1.movenext
loop
end if
dpconn1.Close
set dpconn1 = Nothing
end function
thanx!