Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 23rd, 2004, 03:55 AM
Authorized User
Points: 79, Level: 1
Points: 79, Level: 1 Points: 79, Level: 1 Points: 79, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2004
Location: , , .
Posts: 11
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to bisigreat
Default how do i populate datagrid from a recordset object

how do i populate datagrid from a recordset object in visual basic 6.0

dim cnSrch as ADODB.Connection
Dim rsSrch As ADODB.Recordset
Set cnSrch = New ADODB.Connection
cnSrch.ConnectionString = "provider=microsoft.jet.oledb.4.0;" &
"Data Source = C:\BB\sh.mdb"
Set rsSrch = New ADODB.Recordset
Dim findstr As String
findstr = "select * from PatientTab where CardType = '" & cboCardType & "'"
rsSrch.Open findstr, cnSrch, adOpenDynamic
Set DataGrid1.DataSource = rsSrch

Reply With Quote
The Following User Says Thank You to bisigreat For This Useful Post:
  #2 (permalink)  
Old August 6th, 2009, 04:30 AM
Registered User
Join Date: Aug 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

how can i populate records from a table to data grid,plz give me code
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate combobox from ADO recordset - RESOLVED! robzyc Access VBA 8 May 23rd, 2008 01:07 AM
Populate unbound form with recordset pacg Access VBA 2 September 26th, 2005 06:06 PM
How do i populate datagrid from a recordset object bisigreat BOOK: ASP.NET Website Programming Problem-Design-Solution 1 September 22nd, 2004 11:35 AM
populate data from Access Table into datagrid bisigreat VB How-To 6 August 17th, 2004 06:58 AM
using fields in recordset to populate textbox stoneman Access 2 October 7th, 2003 11:03 AM

All times are GMT -4. The time now is 06:59 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.