Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection object is not returned
Message
From
09/04/2002 08:19:59
 
 
To
All
General information
Forum:
Visual Basic
Category:
VBScript
Title:
Connection object is not returned
Miscellaneous
Thread ID:
00642577
Message ID:
00642577
Views:
40
I have created a COM componet in VB. I created a fuction "CreateCon"
which create a DB connection obect and return it. its code is as follow

'---Code
Option Explicit

Public Function CreateCon() As Variant

Dim con As ADODB.Connection
Set con = New ADODB.Connection
'Dim rs As ADODB.Recordset
'Set rs = New ADODB.Recordset

con.Open "Data Source=myPath\DBName.mdb; Provider=Microsoft.Jet.OLEDB.4.0;"

Set CreateCon = con
Set con = Nothing
End Function

'-----------------------------
After creating dll I call this COM component from ASP as given below

set conClass = server.CreateObject ("projectName.classNam")
set con = conClass.CreateCon

BUT

it gives following error
"Arguments are of the wrong type, are out of acceptable range, or are inconflict with one another "

which mean connection object is not created.
Please tell me wtz wrong in it.

Please help ASAP
Thank

Shahid
Next
Reply
Map
View

Click here to load this message in the networking platform