var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Using 2 Secured Dtabases in One Vb Prgm
I have the need to be able to open 2 differnt secured databases in one prgm, I do not need them open at the same time. The snippet of code below works fine for the first database I open
DBEngine.SystemDB = "e:\netcab\Automated reports\apo.mdw"
Set Myworkspace = DBEngine.CreateWorkspace("New", "aaaaaaa", "bbbbbb")
' Set db = DBEngine.Workspaces(0).OpenDatabase("e:\netcab\Aut omated reports\ecm daily.mdb")
Set db = DBEngine.Workspaces(0).OpenDatabase("e:\netcab\Aut omated reports\apo.mdb")
Set rs = db.OpenRecordset("Select * from USERS where USERS ='" & Strnbkid & "'" & " and [computer name]='" & StrComputername & "'" & " and scheduled='Y'")
If rs.RecordCount > 0 Then
Set rs = db.OpenRecordset("usage log", dbOpenTable)
rs("Computer_Name") = StrComputername
rs("nbk_id") = Strnbkid
rs("Person_Name") = StrUsername
rs("date_time") = Now
rs("Authorized") = "Y"
rs("Request to Run") = StrJobname
Set db = Nothing
Set Myworkspace = Nothing
Now when I try to set up to open the next database with the code below
DBEngine.SystemDB = "e:\netcab\Automated reports\ECM.mdw"
The SystemDB never changes to the new MDW file thus causing a Logon failure when I continue with the rest ofthe code.
How do you clear out the first Value for the dbengine.systemdb and replace with a new value.
Please let me know any ideas you may have
im not used to on how you make your codes, but is it possible if you close also the DBEngine set to nothing , then the workspace. some connections are very difficult to handle
hope this will help
Hi Try to close the first connection with the first DB
and then open the connection with the second db
and tehn make refresh to it
hope that will work
Sami Al Damiri ...