Hello I have two tables users and Private I want to be able to view, update, delete info from the two tables from one screen
scenario user logs in to system system stores userID and transfers userID to new table this user id will be used by sql to load only that users details (UserID is PK for users and FK for private) the user will be able to update some of their info. as an admin they will use the same procedure except they will be able to see all members details and add new members using update or delete. I have tried to use a data Sqladaptor to do this but the info will display it will not allow delete update. If I load both tables into separate Sqladaptors they are not in sync anyone have any suggestions
So you want to separate permissions? You're talking about 'from one screen'. I take it there's an application presenting it; why not implement the distinction in the application and use a where-clause?
so for me to add a new row I will have to run two sperate quries to the DB one for each table I am using a VBform to display/add or amend info I have two seperate calls for updating to bits of info in difrent forms but they are on seperate buttons, I want to be able to add a new user this would need to add info to the user and private table. would this mean I will need to do the same update the first table and then update the second table whith two buttons ?
I have this for one of the update buttons
Me.SqlCommandPass.Parameters("@UserID").Value = txtUserID.Text
SqlCommandPass.Parameters("@Password").Value = txtPassword.Text
Dim rowschanged As Integer
rowschanged = Me.SqlCommandPass.ExecuteNonQuery()
MessageBox.Show("Number of rows altered= " & rowschanged)
Catch ex As Exception
MessageBox.Show("Error in update: " & ex.Message)
I would need the button to show the newly generated userID it is auto genetated