Results 1 to 4 of 4

Thread: database security

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    43

    database security

    Please help with Database connection. I am OK with VB but rather new to access database

    I have an access2000 database Customer.mdb
    I have set up a data environment as follows:
    cn.ConnectionString = "Provider =Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=" & App.Path & "\Customer.mdb"
    I have set up a data environment as follows:
    Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Sales\Customer.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False

    Problem I want to protect the database with password protection but became unstuck.

    I have added password raysales to the database and changed rhe connection string and do not have a problem with that
    cn.ConnectionString = "Provider =Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=" & App.Path & "\Customer.mdb;Password=raysales"

    I need to changed the data environment but have no clue: Got as far as Connection1 data link properties adding
    Username: Admin and Password: raysales with result =
    test connection failed because of an error initializing provider. Cannot start your application. The workgroup file is missing is missing or opened exclusively by another user.

    I have played around with users and groups but managed only to mess up the whole database. Lucky I made a backup first

    I have only my project open. Database closed.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: database security

    Hi RayComp, welcome to VBForums!

    I think the problem may actually be the connection string, as Access actually adds a username of "admin" along with the database password. I think your connection string should be like this:
    VB Code:
    1. cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _
    2.      & "Data Source=" & App.Path & "\Customer.mdb;User Id=admin;Password=raysales;"

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    43

    Re: database security

    thanks will try

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: database security

    You could try something like this...

    VB Code:
    1. DataEnvironment1.Connection1.ConnectionString = "Your connection string"
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

Posting Permissions

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



Click Here to Expand Forum to Full Width