| | |
|
Active Server Pages ASP a directory of ASP tutorials applications scripts components and articles for the novice to professional developer. CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: Problem with passing a recordset to a procedure |
From: |
Harlan |
Date: |
3/16/1999 8:58:13 AM |
IP: |
206.222.20.2 |
well, I don't know the answer to your question. But then again most the time I don't ;) Athough, I have a solution, maybe. Try creating both your recordset and connection object as public variables. Because this is vbscript you don't use "public" to make variables public, you simply dimension them out side of any subs. Examples:
set connMyConn = server.... 'this is a public variable now.
Sub mySub()
set connMyConn2 = server... 'this is a private variable to this sub function.
end sub
so what does this mean?
if you set your connection object above any sub functions, your sub functions will have access to it, so you won't need to pass it to them.
so mySub() can use connMyConn because its declared above any subs. Actually outside of any subs is better wording. However, on the topic of error handling, checking. Putting it as clearly as I can, vbscript SUCKS at error handling/trapping/debugging. If my project is going to be more then 1000 lines of code, I always move it to an activex dll, your coding is the same for the most part, and its a lot nicer to work with.
I know I didn't answer your question, but I hope I helped some anyway. You might want to pete if he's still around, I think he's done more with the type of code your using (I never .open a recordset).
|
Previous Message
Follow Up - Re: Problem with passing a recordset to a procedure - Tony 3/16/1999 10:38:26 AM
|
|

|
|
|
|