Quote:
> sNewUser = "Bob"
> sNewPw = "letmein"
> suser = DBEngine.Workspaces(0).UserName
> DBEngine.IniPath = "C:\windows\pmtest.ini"
> Set specialWS = DBEngine.CreateWorkspace("special", suser, spw)
> Set Newworkspace = DBEngine.CreateWorkspace("Newworkspace", sNewUser, sNewPw) **** Err 3028
You didn't indicate if you're using VB4 16-bit or 32-bit, but
from the code I'll guess you're using 16-bit. Anyway, the first
thing is your using the DBEngine object *before* setting the
IniPath property. You need to set the .IniPath property first
before making any reference to any DAO objects or the DBEngine
will be initialized in its default configuration. Also, you're
reading the UserName property without having established a
workspace or setting the UserName property.
FYI, the .IniPath property is not used to indicate the system
database with 32-bit VB4. You need to set the SystemDB property
of the DBEngine object.
HTH,
Joe
Never underestimate the power of a WAG.