OopeDataBase - Not a valid password

Tsango

Registered User.
Local time
Today, 00:42
Joined
Mar 31, 2006
Messages
64
OpenDataBase- Not a valid password

This is driving me mad - can anyone get there head around this

I want to programatically add/delete fields ect from the front end. However I keep getting "Password Not Valid" at the set db line when I know it's correct

Dim wrkJet As Workspace
Dim db As Database
Dim cnn As ADODB.Connection
Dim SQL As String

' Create Microsoft Jet Workspace object.
Set wrkJet = CreateWorkspace("NewWorkSpace", "admin", "", dbUseJet)
Set db = wrkJet.OpenDatabase("C:\Data\BackEnd_be", True, False, "PWD=mypass")

SQL = "ALTER TABLE Staff ADD COLUMN Test TEXT (10);"

db.Execute SQL
 
Last edited:

Users who are viewing this thread

Back
Top Bottom