473,406 Members | 2,849 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,406 software developers and data experts.

Can't seem to update all the fields in database

here i have attached a file see the file and i want code for that form urgent
Attached Files
File Type: zip vb6.0 login.zip (8.7 KB, 130 views)
Jul 26 '06 #1
8 2386
iam_clint
1,208 Expert 1GB
ok what is in this file i opened it no virus's found on it but no file extension what exactly is the problem and wheres the code.
Jul 26 '06 #2
Private Sub Command1_Click()
On Error Resume Next
If Trim(Text3.Text) = Trim(Text4.Text) Then

If (Trim(Text1.Text) = Trim(rs.Fields(0))) And (Trim(Text2.Text) = Trim(rs.Fields(1))) Then

rs!pwd = Trim(Text3.Text)
rs.Update
MsgBox "Password change successfully"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Else
GoTo level1
End If
Else
level1:
MsgBox "Please correct Password"
Text2.Text = ""
Text3.Text = ""
End If
End Sub


i am using this code changing password its ok but it is changing first field only in database when u enter 2nd o 3d field it shows error
1st field mean userids in my table ADMIN,POWER and USER are the users when i change ADMIN its ok but when i enter power or use it shows error


please see and responce to me as soon as posible if posible come to chat
koti_bujji1@yahoo.com


Thanks
Jul 27 '06 #3
sashi
1,754 Expert 1GB
hi kumar,

take a look at tutorial 2.. take care..

http://www.thescripts.com/forum/thread517434.html
Jul 29 '06 #4
mkfaiz
1
ok what is in this file i opened it no virus's found on it but no file extension what exactly is the problem and wheres the code.
THE MAIN PROBLEM WITH THE CODE YOU ARE FETCHING ALL THE RECORDS FROM TEH DATABASE

YOU HAVE TO CHOOSE ONLY ONE.

BY USEING
RS.FILTER = "UserID = " & trim(text1.text)
if it return something.
you can update it
else
there is no user at the name
simple
Jul 30 '06 #5
THE MAIN PROBLEM WITH THE CODE YOU ARE FETCHING ALL THE RECORDS FROM TEH DATABASE

YOU HAVE TO CHOOSE ONLY ONE.

BY USEING
RS.FILTER = "UserID = " & trim(text1.text)
if it return something.
you can update it
else
there is no user at the name
simple


why u don't try this

RecordSet.Open "Update <Table Name> Set = <Ur Field> <Where Criteria>", <Conn>, <Dynamic>, <Batch Optimistic>
Jul 31 '06 #6
dear friend

how do hide column in datagrid control or dbdatagrid control in vb6.0
pls help me
Aug 1 '06 #7
Niheel
2,460 Expert Mod 2GB
kumar_ps,

You should state your question in the first post and also when asking for help choose better titles for your thread. "Urgent Help" is not a good title.

- KUB
Aug 1 '06 #8
sashi
1,754 Expert 1GB
Hi Kumar,

what is so urgent my fren?? everyone is rushing for something almost every second.. so.. be relax.. pls state your problem clearly so some will be able to help out faster.. if possible post the portion of the code segment that is triggering error.. take care my fren.. :)

follow the steps below
1st - problem statement
2nd - steps taken to overcome the problem
3rd - code segment or error message/number that will be useful for troubleshooting
4th - follow-up your post for any response

it's much easier to slove problem in this way.. this is only my suggestion.. take care.. :)
Aug 7 '06 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: jimserac | last post by:
I had previously posted this in an Access forum with negative results so will try here. Although this question specifies an Access database, I also wish to accomplish this with a large MS SQL...
2
by: Ville Mattila | last post by:
Hi there, I will post my question to this group too bacause the .data group seems to be rather quiet. I've been playing with VB.NET and ADO for a week now and find the different data handling...
10
by: cj | last post by:
I have lots of tables to copy from one server to another. The new tables have been created to match the old ones. I practiced with one table. I created the select command (select * from tableA)...
2
by: devine | last post by:
Hi All, I am trying to send an automatic email when an update has been made. My update statement will updates 6 fields, and dependant on one of the fields, I would like to send an email using CDO....
52
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible...
7
by: uarana | last post by:
Hi All, Can someone please help me with the following code. I've been working on this for the past 2 days and i can't seem to get past this obstacle. Problem: The code opens up the Table...
3
by: EForbes | last post by:
Not an expert so I need some help. I have this function that I am trying to run. The function is to compine two tables, comcare a field in the tables and update the one table if te fields are not...
0
by: Miro | last post by:
vb2005 express (Im trying to figure out how to "Update databases manually" ) I created a screen, and have created a button. I have a file that has 3 fields: StaffID -Primary Key Edit_User ...
1
by: D | last post by:
I am trying to add records to a database and getting no errors but the databse is not updated. Not sure what is wrong maybe in my function I'm losing some thing? What do you think? My code is...
4
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.