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

help Retrieving data

hi,
im new joiner and i need help doing my project. im using visual basic and ms access.


how can i retrive the data which i have added in database

i add the data with this code
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmd_add_Click()
  2. Dim dbs As DAO.Database
  3. Dim rcd As DAO.Recordset
  4. If Me.txt_username = "" Then
  5. MsgBox "Enter Your Name Please", , "Your Name"
  6. Me.txt_username.SetFocus
  7. Exit Sub
  8. ElseIf Me.txt_password = "" Then
  9. MsgBox "Your Password ", , " Your Password"
  10. Me.txt_password.SetFocus
  11. Exit Sub
  12. Else
  13. Set dbs = OpenDatabase(App.Path & "\Names.mdb")
  14. Set rcd = dbs.OpenRecordset("userandpassword")
  15. With rcd
  16. .AddNew
  17. rcd!UserName = Me.txt_username
  18. rcd!Password = Me.txt_password
  19. .Update
  20. Me.txt_username.Text = ""
  21. Me.txt_password.Text = ""
  22. End With
  23. End If
  24.  
  25.  
  26. End Sub
  27.  
  28.  
im hoping you can help me with this

regards,
Nov 14 '08 #1
3 1207
debasisdas
8,127 Expert 4TB
are you trying to create new id in database and login with existing ids ?
Nov 14 '08 #2
Hi there.

I could realize that you create a data entry for your data base with 2 or 3 fields.

UserName
Password amd probably an Id for each register line of your database.

To perform what I think you want you need to create a Query with Parameters.

Something like "SELECT UserName, Password FROM YourDataBaseName
WHERE UserName = txtName.text AND
Password = txtPassword.text

This Query will return to your program a Row of your database if is there one that has the information you supply in your Query.


I hope this could help you

Rpicilli
Nov 15 '08 #3
Thank you for your help :)
Nov 17 '08 #4

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

Similar topics

10
by: Krakatioison | last post by:
Hi everyone, can someone point me to download of an example for saving and retrieving to/from MYSQL database. Or did anyone of you tried this and could share your code with me. I've got some data...
1
by: trialproduct2004 | last post by:
hi all I have one problem in vb.net application. I am having two threads which are starting at the same time. Both these threads are reading one file and retrieving data from same file. When one...
0
by: kid4rilla | last post by:
I can successfully write the binary data to an image data type, and successfully retrieve it, but when I attempt to play the file in media player after retrieving it, I get the file type isn't...
0
by: Andy | last post by:
Hi All. I'm working for a company that has set out a guideline for retrieving data from a database. Nobody can explain to me the reason for the following. When retrieving a set of records...
1
by: jimmyfo | last post by:
Hi, I recently wrote an ASP.Net web application in VS2005 and published (using VS2005 Publish feature) it to a relatively clean machine with ASP.Net 2.0 and MDAC 2.8 installed on it. However, when...
15
by: Jay | last post by:
I have a multi threaded VB.NET application (4 threads) that I use to send text messages to many, many employees via system.timer at a 5 second interval. Basically, I look in a SQL table (queue) to...
6
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in...
12
cassbiz
by: cassbiz | last post by:
I downloaded this calendar off the web and am trying have it show twice, once as calendar.php and the second time as calendar1.php I need the visitor to be able to select a beginning date and an...
5
by: Sanjay Pais | last post by:
I have a table with over 1.3 million rows. I am retrieving only 20 at a time using the with - over clauses In query analyser, the data is retrieved in under a second. When retrieving using the...
3
by: ajos | last post by:
Hello friends, In my action class i am getting a resultset data which im storing in a arraylist. In my jsp page im retrieving the arraylist data as-----> <%publicity.PendingReqForm prfObj=null;...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.