473,322 Members | 1,232 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Update record

Mel
hi,

How could I update a record in the database?..my sql statement is: dim sql="update tblusers set password='" & txtnewpassword.text & "' where username='" & txtusername.text & "' and Password='" & txtoldpassword.text &"'"

This a change password form with btnOK and btnCancel button, with textboxes txtusername,txtoldpassword,txtnewpassword,txtconfi rmpassword. Pls. show me the simplest way. txtusername.text has username public variable that was passed by the login form.
Nov 20 '05 #1
3 1086
Hi Mel,

There are a lot of ways, when I understand you well will this one probably
suits the most
Have as well a look for the "insert" when it are new ones.

You can look for the dataadapter too, however that is another method.

http://msdn.microsoft.com/library/de...mmandtopic.asp

I hope this helps?

Cor

How could I update a record in the database?..my sql statement is: dim sql="update tblusers set password='" & txtnewpassword.text & "' where
username='" & txtusername.text & "' and Password='" & txtoldpassword.text
&"'"
This a change password form with btnOK and btnCancel button, with

textboxes txtusername,txtoldpassword,txtnewpassword,txtconfi rmpassword. Pls.
show me the simplest way. txtusername.text has username public variable that
was passed by the login form.
Nov 20 '05 #2
"Mel" <Me*@discussions.microsoft.com> schrieb

How could I update a record in the database?..my sql statement is:
dim sql="update tblusers set password='" & txtnewpassword.text & "'
where username='" & txtusername.text & "' and Password='" &
txtoldpassword.text &"'"

This a change password form with btnOK and btnCancel button, with
textboxes
txtusername,txtoldpassword,txtnewpassword,txtconfi rmpassword. Pls.
show me the simplest way. txtusername.text has username public
variable that was passed by the login form.

http://msdn.microsoft.com/library/en...withadonet.asp

http://msdn.microsoft.com/library/en...tingDataVB.asp
ADO.Net group: microsoft.public.dotnet.framework.adonet

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
Mel
I read the links that you gave me but how could I reference my textboxes like txtoldpasssword,txtnewpassword and txtconfirmpassword? Instead @oldpassword can I write txtoldpassword.text?
"Mel" wrote:
hi,

How could I update a record in the database?..my sql statement is: dim sql="update tblusers set password='" & txtnewpassword.text & "' where username='" & txtusername.text & "' and Password='" & txtoldpassword.text &"'"

This a change password form with btnOK and btnCancel button, with textboxes txtusername,txtoldpassword,txtnewpassword,txtconfi rmpassword. Pls. show me the simplest way. txtusername.text has username public variable that was passed by the login form.

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Reply via newsgroup | last post by:
Folks, When performing an update in mysql (using PHP), can I find out how many records were matched? mysql_affected_rows() won't work... and I have the following problem that I thought I...
3
by: Fred | last post by:
Hi out there, I have problems finding a way to warn a user that another user intends soon to update the same specific row. Let me explain. User 1 get to a JSP "update customer record" page....
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
3
by: Mihaly | last post by:
I want to update a record into a table in SQL Server 2000 database from C#. This table is used concurently for other users too, and I want to be sure that from the read of record to the update no...
3
by: Shapper | last post by:
Hello, I have created 3 functions to insert, update and delete an Access database record. The Insert and the Delete code are working fine. The update is not. I checked and my database has all...
5
by: PAUL | last post by:
Hello, I have 2 tables with a relationship set up in the dataset with vb ..net. I add a new record to the parent table then edit an existing child record to have the new parent ID. However when I...
5
by: Louis LeBlanc | last post by:
Hey folks. I'm new to the list, and not quite what you'd call a DB Guru, so please be patient with me. I'm afraid the lead up here is a bit verbose . . . I am working on an application that...
2
by: Brett | last post by:
My database has 2 tables: Table1 & Table2. If a field is not null on a record in table2, then the not null fields in table1 that correspond to the records in table1 needs to be updated to match the...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.