Forum Moderators: open

Message Too Old, No Replies

Returning recordset object in VBScript

         

rayw

4:50 pm on Jul 6, 2007 (gmt 0)

10+ Year Member



Hi,

Sorry for the newbie question, but...

I was wondering if there was a way to return an object (such as a recordset) in vbscript functions.

Something like:


public function returnObj
...
set someObj = Server.CreateObject("ADODB.Recordset") ' or any type of obj
...
...
returnObj = someObj
end function

is this possible?

bmcgee

9:47 pm on Jul 7, 2007 (gmt 0)

10+ Year Member



Sure, but anytime you are assigning an object to a variable, you have to use the SET command

SET returnObj = someObj