Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Access2000 (error 424) and Security Question

Status
Not open for further replies.

mans

Programmer
Mar 18, 2000
136
AU
Hello,

I have two issues:

1/
I am installing a VB6 application that was developed with an Access2000 database, on my customers machines. I have installed this program without any problems at all on three machines. On the fourth machine the installation process goes fine although when I attempt to run the relevant program executable, I get this message “Run-time error ‘424, An Object is Required”, I cannot run the program. This is the first customer machine to have MSOffice 2000 installed (including Access2000), I am not sure if this is relevant to my problem. Can somebody please let me know where I can start to track down the cause of this error message.

2/
The database above is secured using the code below. When I try to open the database below on a (non-development) machine with Access 2000, it does not prompt for a password as I thought it should (it just opens the database). Could somebody pleased let me know what I need to do so that all terminals are prompted for a password if they attempt to open the database below. Or alternatively, is there a code which will not allow them to open the database under any circumstances (this would be even better).

Public Sub Main()
Dim daoDB36 As Database
Dim S As String
Dim db As Database
Dim ws As Workspace

If GetSetting("project", "Settings", "Copyright", "No") = "No" Then ‘ Checks registry
DBEngine.SystemDB = "c:\program files\management\competition\secure.mdw"
Set ws = CreateWorkspace("", "username", "password", dbUseJet)
Set db = ws.OpenDatabase("c:\program files\management\competition\database.mdb", False)
Set db = OpenDatabase("c:\Program Files\Management\competition\database.mdb")

frmCopyright.Show vbModal ‘ displays copyright details
Else

DBEngine.SystemDB = "c:\program files\management\competition\secure.mdw"
Set ws = CreateWorkspace("", "username", "password", dbUseJet)

Set db = ws.OpenDatabase("c:\program files\management\competition\database.mdb", False)
Set db = OpenDatabase("c:\Program Files\Management\competition\database.mdb")
End If

End Sub

Thank You
 


If I am correct, when I received this error it was My program and Access 97 was trying to access the same Database at the same time. Which generated the error in my VB program. You might want to ensure there is not two instances of the database being opened simultaneously.


Hope this helps,

John Stephens
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top