![]() |
Visual Basic Problem
Hello, i'm trying to make my program change a value in a database.
I've got a database called Account, and a Table called Accounts. I have 4 columns in this table. Id(Key column), UserName, Password and Adminpower. What I am trying to do is to make a button change a value in that table. What I do not know is how to make the program know which row i want to change the value in. Code:
Private Sub btnAdmin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdmin.ClickWhen I try to press the button I get an error saying that the table doesn't exist. Any help is appreciated. Thanks Screenshots: EDIT!!! Problem solved. I got it working, I'll keep all the text here if anyone else has a similar problem. And this is what I used: Code:
UPDATE Accounts SET Adminpower = 1 WHERE '" & TextBox1.Text & "' = ""UserName"" AND '" & TextBox2.Text & "' = ""Password""" |
Syntax may be a little bit off....
Code:
dim _user as String = txt_UserName.Text |
Quote:
|
| All times are GMT +1. The time now is 08:56 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.