>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.
Not necessarily. I would put some error handling in the function and return the error number and description as the return value to see what's the exact nature of the problem. It could be that the IIS account does not have permissions to the MDB path.
>Please tell me wtz wrong in it.
>
>Please help ASAP
>Thank
>
>Shahid
Previous
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