Consulting

Results 1 to 10 of 10

Thread: Solved: Automatic login

  1. #1
    VBAX Regular
    Joined
    Jun 2005
    Posts
    65
    Location

    Solved: Automatic login

    Hi Again

    Does anyone now how, through a vbscript (previous thread), to automaticly login to a pasword protected access 200 database?

  2. #2
    VBAX Mentor Brandtrock's Avatar
    Joined
    Jun 2004
    Location
    Titonka, IA
    Posts
    399
    Location
    I assume that you (or your end user) have permission to access the database and you are asking how to use the known quantities (username and password) to log in.

    Is that accurate?

    No link to your previous thread, and I am being a tad lazy by not searching for it.

    Regards,
    Brandtrock




  3. #3
    VBAX Regular
    Joined
    Jun 2005
    Posts
    65
    Location
    Hi thanks for reading

    Yes it is our statistical database and do have full access. The goal is to make a night time import utility work.

  4. #4
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    Just has a database password? No workgroup protection?

  5. #5
    VBAX Regular
    Joined
    Jun 2005
    Posts
    65
    Location
    Hi again

    no. no workgroup only an admin login and user login

  6. #6
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    [VBA] Sub OpenDatabaseX()
    Dim wrkJet As Workspace
    Dim dbsNorthwind As Database
    Dim dbsPubs As Database
    Dim dbsPubs2 As Database
    Dim dbsLoop As Database
    Dim prpLoop As Property
    ' Create Microsoft Jet Workspace object.
    Set wrkJet = CreateWorkspace("", "admin", "", dbUseJet)
    ' Open Database object from saved Microsoft Jet database
    ' for exclusive use.
    MsgBox "Opening Northwind..."
    Set dbsNorthwind = wrkJet.OpenDatabase("Northwind.mdb", _
    True)
    ' Open read-only Database object based on information in
    ' the connect string.
    MsgBox "Opening pubs..."

    ' Note: The DSN referenced below must be set to
    ' use Microsoft Windows NT Authentication Mode to
    ' authorize user access to the Microsoft SQL Server.
    Set dbsPubs = wrkJet.OpenDatabase("Publishers", _
    dbDriverNoPrompt, True, _
    "ODBC;DATABASE=pubs;DSN=Publishers")
    ' Open read-only Database object by entering only the
    ' missing information in the ODBC Driver Manager dialog
    ' box.
    MsgBox "Opening second copy of pubs..."
    Set dbsPubs2 = wrkJet.OpenDatabase("Publishers", _
    dbDriverCompleteRequired, True, _
    "ODBC;DATABASE=pubs;DSN=Publishers;")
    ' Enumerate the Databases collection.
    For Each dbsLoop In wrkJet.Databases
    Debug.Print "Database properties for " & _
    dbsLoop.Name & ":"
    On Error Resume Next
    ' Enumerate the Properties collection of each Database
    ' object.
    For Each prpLoop In dbsLoop.Properties
    If prpLoop.Name = "Connection" Then
    ' Property actually returns a Connection object.
    Debug.Print " Connection[.Name] = " & _
    dbsLoop.Connection.Name
    Else
    Debug.Print " " & prpLoop.Name & " = " & _
    prpLoop
    End If
    Next prpLoop
    On Error GoTo 0
    Next dbsLoop
    dbsNorthwind.Close
    dbsPubs.Close
    dbsPubs2.Close
    wrkJet.Close
    End Sub
    [/VBA]

  7. #7
    VBAX Regular
    Joined
    Jun 2005
    Posts
    65
    Location
    Hey how you doing . Hows your dog?

    thanks. I will work on it as soon as I put out my other fire

  8. #8
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    Thanks for asking. My dog is almost back to normal. His breathing is still a little shallow, and his rear legs can wobble, but he's shown gradual and steady improvement. At this rate, in another week or two he ought to be back to his former spunky self.

  9. #9
    VBAX Regular
    Joined
    Jun 2005
    Posts
    65
    Location
    Good to hear.

    Did you ever figure out what happen?

  10. #10
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    Unfortunately, no.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •