Beginner - Custom ActiveX Login Control 
Author Message
 Beginner - Custom ActiveX Login Control

Beginner - Using VB5 to create an ActiveX Login Control , would like
to Authenticate UserName and Password using an Access database,

Heres the essential code that seems to function fine in a VB Test
application. The problem occurs when the Control Object is included
in an .htm file , the code produces

"Error 3024:Couldnt find file NWind.mdb"

Private Sub SearchCustomers()
    Dim dbs As Database, rstCustomers As Recordset

    Set dbs = OpenDatabase("Nwind.mdb")
    Set rstCustomers = dbs.OpenRecordset("Customers", _
        dbOpenTable)
    rstCustomers.Index = "CompanyName"
    rstCustomers.Seek "=", "A COMPANY"

    If rstCustomers.NoMatch Then
        MsgBox "No Match Found"
    Else
        MsgBox "A Match Was Found"
    End If
    rstCustomers.Close
    dbs.Close

End Select
End Sub

Why the difference , error also occurs if .mdb file is included
in the same directory as the .htm file,

Regards
Marco Orlandi
KZNTL - Corp IT
South Africa



Mon, 01 Dec 2003 18:45:30 GMT  
 Beginner - Custom ActiveX Login Control
Hi,

I think your problem is, that the ActiveX control is running on the client
and not on the server. This means that your Access datanbase, which
obviously resides on the server, is not found. Microsoft has an solution to
this  - I think it's called RDS. An other solution is to use some og the
suff from www.grinsoft.com, who also has a soltion to Internet Database
Accces.

Good luck.

Bj?rn


Quote:
> Beginner - Using VB5 to create an ActiveX Login Control , would like
> to Authenticate UserName and Password using an Access database,

> Heres the essential code that seems to function fine in a VB Test
> application. The problem occurs when the Control Object is included
> in an .htm file , the code produces

> "Error 3024:Couldnt find file NWind.mdb"

> Private Sub SearchCustomers()
>     Dim dbs As Database, rstCustomers As Recordset

>     Set dbs = OpenDatabase("Nwind.mdb")
>     Set rstCustomers = dbs.OpenRecordset("Customers", _
>         dbOpenTable)
>     rstCustomers.Index = "CompanyName"
>     rstCustomers.Seek "=", "A COMPANY"

>     If rstCustomers.NoMatch Then
>         MsgBox "No Match Found"
>     Else
>         MsgBox "A Match Was Found"
>     End If
>     rstCustomers.Close
>     dbs.Close

> End Select
> End Sub

> Why the difference , error also occurs if .mdb file is included
> in the same directory as the .htm file,

> Regards
> Marco Orlandi
> KZNTL - Corp IT
> South Africa



Fri, 30 Jan 2004 01:40:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Replace VBX custom controls with ActiveX controls

2. ActiveX login doesn't work with WebBrowser control, but is fine in IE6

3. ActiveX login doesn't work with WebBrowser control, but is fine in IE6

4. beginner need help: ActiveX control - Licence required?

5. Custom ActiveX controls cause MS-Office 2000 forms to crash

6. Word2000 crashes with custom VB6 ActiveX Control

7. Adding a custom ActiveX control

8. VB 6 ActiveX Control in Windos Form, can't access any custom properties

9. Unable to use events from a custom imported ATL ActiveX control

10. Events for custom ActiveX Controls?

11. Newbie: Custom Property of ActiveX control not working properly

12. Custom ActiveX control

 

 
Powered by phpBB® Forum Software