Welcome to Dream.In.Code
Become a VB Expert!

Join 149,929 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,782 people online right now. Registration is fast and FREE... Join Now!




Help Me Out

 
Reply to this topicStart new topic

Help Me Out, Register Page Using ADODC

halluzineyt
2 Jan, 2008 - 01:09 AM
Post #1

New D.I.C Head
*

Joined: 2 Jan, 2008
Posts: 10

before i forgot these are my codes for the register page



CODE

Private Sub cmdcancel_Click( )
End
End Sub

Private Sub cmdClear_Click( )
txtName.Text = ""
txtpassword.Text = ""

End Sub

Private Sub cmdConfirm_Click()

adoUserInfo.Recordset.Fields("username") = txtuser.Text   -----------error occurs here
adoUserInfo.Recordset.Fields("password") = txtpassword.Text
adoUserInfo.Recordset.Update

frmRegister.Hide

frmlogin.Show

End Sub


Private Sub frmregister_Load()
adoUserInfo.Recordset.AddNew
End Sub

can you help me out what is the problem here??

or email me at halluzineyt@yahoo.com

This post has been edited by William_Wilson: 2 Jan, 2008 - 07:48 AM
User is offlineProfile CardPM
+Quote Post

LookNAO
RE: Help Me Out
2 Jan, 2008 - 06:56 AM
Post #2

D.I.C Head
**

Joined: 28 Dec, 2007
Posts: 66



Thanked: 1 times
My Contributions
What database are you using????


User is offlineProfile CardPM
+Quote Post

William_Wilson
RE: Help Me Out
2 Jan, 2008 - 07:48 AM
Post #3

lost in compilation
Group Icon

Joined: 23 Dec, 2005
Posts: 4,101



Thanked: 25 times
Dream Kudos: 3275
Expert In: Java, C, Javascript

My Contributions
code.gif
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: Help Me Out
2 Jan, 2008 - 11:20 AM
Post #4

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,655



Thanked: 313 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
You will have to provide the error. Have you tried using adoUserInfo.recordset.addNew and then for each field using the .value property? Here is a little example using the field numbers...

CODE

Adodc1.recordset.addnew

adodc1.fields(0).value = "Value you want"
adodc1.fields(1).value = "Value you want"

Adodc1.recordset.update


This code might push you into the right direction. But if we can see the error you are getting that we can know for sure what is going wrong with this.

Help us help you. smile.gif
User is offlineProfile CardPM
+Quote Post

halluzineyt
RE: Help Me Out
3 Jan, 2008 - 04:31 AM
Post #5

New D.I.C Head
*

Joined: 2 Jan, 2008
Posts: 10

tnx for replying masters = )

so i will put in thise code to frmregister_load ryt??

CODE

Private Sub frmregister_Load()
Adodc1.recordset.addnew

adodc1.fields(0).value = "Value you want"
adodc1.fields(1).value = "Value you want"

Adodc1.recordset.update

End Sub


like this??

ahm another one ,, about the login page here is the code

i cant connect the adouserinfo in this one form do you think i miss some alteration on the property page??

CODE

Private Sub cmdLogin_Click()

Dim usrname As String
Dim psword As String
Dim usernam As String
Dim pssword As String
Dim Msg As String


Register.adoUserInfo.Refresh
usrname = txtName.Text
psword = txtpassword.Text


Do Until Register.adoUserInfo.Recordset.EOF
If Register.adoUserInf.Recordset.Fields("username").Value = usrname And Register.adoUserInf.Recordset.Fields("password").Value = psword Then
frmlogin.Hide
frmLibrary.Show
Exit Sub

Else
Register.adoUserInfo.Recordset.MoveNext
End If

Loop

Msg = MsgBox("Invalid password, try again!", vbOKCancel)
If (Msg = 1) Then
frmlogin.Show
txtName.Text = ""
txtpassword = ""

Else
End
End If


End Sub


what do you think is wrong with this one??

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 03:20PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month