General information
Title:
Connection object is not returned
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only