It's plenty possible, Dan. As Marks Sikes put it (over a year ago):
"With the most recent ADO v2.1, this happens. A quick inspection using
VC shows: assigning a VBScript "Nothing" value, as shown in literally
all examples, assigns a variant of type VT_DISPATCH (i.e. IDispatch),
with a null object reference (i.e. 0x00000000). However, JScript uses
a variant of type VT_EMPTY for unassigned variables, and type VT_NULL
for variables set to null:
// The variable "Nothing" below will be a variant tagged
VT_EMPTY // The variable "Null" below will be a variant tagged
VT_NULL
var Nothing, Null = null;"
So, here are your 3 solutions:
1) Include a section of VBScript to return Nothing:
<script language="VBScript" runat="server">
Function GetNothing()
' I forget if you need set here or not...
Set GetNothing = Nothing
End Function
2) Get a reference to nothing from a new recordset object:
var objRS = Server.CreateObject("ADODB.Recordset");
var Nothing = objRS.ActiveConnection;
// more code here
var objRS.ActiveConnection = Nothing; // this now works
3) Use MS developer Peter Torr's component:
http://www.netspace.net.au/~torrboy/code/jargutil/
There you go!
Richard
Quote:
> I've been trying to make a Disconnected Recordset in Jscript for the
past
> couple hours. Has anyone out there ever gotten it to work. I'm
begining to
> think it isn't possible.
Sent via Deja.com
http://www.deja.com/