Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Aug 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    finishing the program

    can any one do me a favor and tell in steps what should i do to solve this problem:
    i finished my database and connected it to VB 2005 code and it works great,but now i want to make the access to it by user name and password .so i created anew login in my server.. now i want to
    1-encrypt the database or i don know just make it closed when it's transfered to the client computer
    2-make the code access the server or the database through this login account only
    3-make the client through code only execute procedures in database and nothing else.......
    so how to make the whole story work

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Depending on the database if it is SQL Server, then you can create a role and set the permissions on each table, view or stored procedure for that role to allow the user to only do what you want to allow them to do.

  • #3
    New Coder
    Join Date
    Aug 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i tried to create a role and used the name and pass of it in my program
    but it seems the program doesn't feel it at all and even when i use the name of the role with a wrong pass it still work and doesn't give errors

  • #4
    New Coder
    Join Date
    Aug 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    endless database

    the program i'm working on is not gonna finish
    the problem is i made aprogram in vb.net which connects to adata base and the program is working so good while compiling in visual studio but when i try to run the exe file it gives me alot of errors concerning duplicate names and logical file and i don understand what's wrong

  • #5
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,634
    Thanks
    4
    Thanked 148 Times in 139 Posts
    first what database application are you using? you will need to post it here.

    after that since my ESP is not working - and i'm not sure how many other people even have ESP - perhaps you could even show us some problematic code instead of having us guess.

    Failing that I'm sure you won't get a response.

  • #6
    New Coder
    Join Date
    Aug 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok can i send u the program on ur mail?? just to know by urself what are the errors

  • #7
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Is this a SQL server Database? IF yes then you can do all of this in Enterprise Manager.

    Select the database in the left pane and expand it to show all of the objects, click users and make sure that the user is listed in the right pane, if not add the user for the IUSR account. (or the login name) then click roles right clicking on it will give a list of options one being New Database Role... clicking on that will bring up a wizard allowing you to enter the name of the role, to add users to the role you click the Add... button select the user from the list and Click OK to add the user to the role now click OK to add the role. Now that the role has been created you can set the permissions on the tables or stored procedures.


    Select the role, right click on it, then click properties, then click permissions now check the appropriate boxes for the permissions you want to grant for each table and or stored procedure listed.


    If you do not have access to Enterprise Manager then you can create the login and the role through Script. This is more complicated than through Enterprise Manager but it can be done.

    1st you need to create the login to the database. this can be done using a built in stored procedure 'sp_grantlogin'

    EXEC sp_grantlogin N'InsertYourLoginNameHere'

    Now that you have the login created you can create the role by using a built in stored procedure 'sp_addrole'

    EXEC sp_addrole N'insert_role_name_here'

    Now that you have the role you need to assign the rolemember using another built in stored procedure 'sp_addrolemember'

    EXEC sp_addrolemember N'insert_role_name_here', N'Insert_Login_name_here'
    GO


    Next you need to grant permissions for the tables and or stored procedures to run.

    Tables are granted permission like this
    GRANT SELECT ON [TableName] TO [role_name]
    GRANT UPDATE ON [TableName] TO [role_name]
    GRANT DELETE ON [TableName] TO [role_name]

    Stored Procedures are granted permission like this
    GRANT EXECUTE ON [stored_procedure_name] TO [role_name]

  • #8
    New Coder
    Join Date
    Aug 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    oh i didn't do all of that!!
    thank u so much for helping ,i ll do what u say and i hope to do it right


  •  

    Posting Permissions

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