Current location: Hot Scripts Forums » Programming Languages » Visual Basic » Help me on How to Select Records from the database


Help me on How to Select Records from the database

Reply
  #1 (permalink)  
Old 07-17-06, 04:29 AM
airprince airprince is offline
Newbie Coder
 
Join Date: May 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Help me on How to Select Records from the database

Greetings!

Please help me know how to SELECT record from the database in Visual Basic using MS Access Database. Like for instance I want only to view all record with LASTNAME = "GONZALES". All other records without that kind of LASTNAME with not appear on my report.

Hope you could help me.

Thanks.

Airprince
Reply With Quote
  #2 (permalink)  
Old 07-22-06, 02:09 AM
digioz's Avatar
digioz digioz is offline
Community VIP
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
Read up on how to use the Query Builder in Microsoft Access, if you don't know how to write SQL Statements:

http://www.qodbc.com/qodbcoffice.htm

Also, for future questions please at least put "some" effort into trying to use search engines and read tutorials on the subject you need.
__________________
Reply With Quote
  #3 (permalink)  
Old 08-16-06, 02:06 AM
bhar bhar is offline
New Member
 
Join Date: Apr 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

Some hints:

Set rs=New ADODB.Recordset
rs.CursorLocation=adUseClient
rs.Open "SELECT LastName FROM Table WHERE ..... (condition)",CN,adOpenDynamic,adLockOptimistic,adC mdText

Where CN is the connection object (Should be opened )

TRy this Title:"Develop an Inventory management Application Uisng Microsoft's Visual basic" by VK publishers

Regards
bhar
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
select variable from one database to use in another?!?? Deansatch PHP 1 07-07-06 02:24 PM
Dynamic select box from database values PrashantJsp JavaScript 2 05-04-05 12:29 AM
help! urgent.. how to select next 50 records? angela ASP 3 04-24-04 12:58 PM


All times are GMT -5. The time now is 01:15 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.