Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

design q on global variables vs local variables

Status
Not open for further replies.

gacaccia

Technical User
May 15, 2002
258
US
hi all,

just wondering what thoughts might be out there on this. i have a page with a recordset variable that is used in two different procedures on the page and as part of the main code also. for example...

Code:
<%
...
rsVariable.open strSQL, objConn
...

sub sub1()
...
rs.Variable.open strSQL, objConn
...
end sub

sub sub2
...
rs.Variable.open strSQL, objConn
...
end sub
%>

in a situation like this, where the recordset variable is being used to return a new record set in each instance, is it better to have one global recordset variable and directly reference it in each procedure, or is it better to create a local recordset variable for each of the procedures? does it matter?

glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top