|
-
Jul 29th, 2000, 02:21 PM
#1
Thread Starter
Hyperactive Member
Hi all,
-------------------------------------
The code in my global.asa file is as follows
<SCRIPT LANGUAGE=VBSCRIPT RUNAT=SERVER>
Sub Session_OnStart
Set Session("Cnn") = Server.CreateObject("ADODB.Connection")
Session("Cnn").Provider="Microsoft.Jet.OLEDB.4.0"
Session("Cnn").Open "C:\Inetpub\wwwroot\Test.mdb"
End Sub
Sub Session_OnEnd
Session("Cnn").Close
End Sub
</SCRIPT>
---------------------------------------
I have created an ActiveX DLL which uses Microsoft Active Server Pages Object Library
The code in its class file is as follows.
Private ASPResponse As Response
Private ASPSession As Session
Public Sub OnStartPage(sc As ScriptingContext)
Set ASPResponse = sc.Response
Set ASPSession = sc.Session
End Sub
Public Sub PleaseRetrieve()
Dim rs As New ADODB.Recordset
rs.Open "Select * FROM ABCD", ASPSession("Cnn"), adOpenKeyset, adLockOptimistic, adCmdText
'It gives me an error in the above statement. The error message is Run-time error 3001: the application is using arguments that are of the wrong type.
'The error is being caused due to the argument ASPSession("Cnn") which is actually valid as it is being created in the global.asa script
End Sub
----------------
Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|