0

myCommand.CommandText = "update Stutable set password as ('" & TextBox2.Text & "')"" where rollno = " & TextBox3.Text

please can you tell me what is the error in the above statement iam using vb and access database

4
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by nebyas
0

myCommand.CommandText = "update Stutable set password as ('" & TextBox2.Text & "')"" where rollno = " & TextBox3.Text

please can you tell me what is the error in the above statement iam using vb and access database

myCommand.CommandText = "update Stutable set password = '" & TextBox2.Text & "'" where rollno = " & TextBox3.Text

Mark as solved if it helps !!!

0
SqlCommand comm = new SqlCommand();
        comm.CommandText = "update table set field1=@field1 where no=@no";
        comm.Parameters.AddWithValue("@field1", "pass the parameter value");
        comm.Parameters.AddWithValue("@no", "pass the parameter value");

keep your code organised..
hope that helps

0

Hi,

Hope this will work,

myCommand.CommandText = "update Stutable set password = '" & TextBox2.Text & "'  where rollno = " & TextBox3.Text

Edited by __avd: Corrected [code] tags.

-1

"update Stutable set password as ('" & TextBox2.Text & "') where rollno = " & TextBox3.Text

Votes + Comments
Are you sure this will help OP?
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.