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
Register
| FAQ | Members List | Calendar | 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 2nd, 2005, 04:28 PM
Registered User
 
Join Date: Mar 2005
Location: Reno, NV, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to boneill Send a message via MSN to boneill
Default VB.net Database -> user defined object

I'm able to connect to a database and put information into a dataset object. How can I take information from the database and put it into a string for example.

so, to explain better, Let's say I have a table of people in the database and in my vb program I defined a class called people. I want to create a collection of people to use in my program, I want to create people objects and fill their first and last name properties from what is in the database.

am I going about this the wrong way? Let me know! thanks.:D

-Brian O'Neill
Reply With Quote
  #2 (permalink)  
Old May 2nd, 2005, 04:43 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

It depends on the broad overview of what you are trying to accomplish.
Could you expand on your question?
Reply With Quote
  #3 (permalink)  
Old May 2nd, 2005, 04:56 PM
Registered User
 
Join Date: Mar 2005
Location: Reno, NV, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to boneill Send a message via MSN to boneill
Default

yeah, Im sorry im new to this and im having trouble explaining.

I have a database built with access. I can make an OLeDBconnection to the database.

I want to get data out of a table (example: names of people in a table of people) and save it as a string.

-Brian O'Neill
Reply With Quote
  #4 (permalink)  
Old May 2nd, 2005, 05:17 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

open a recordset like
"select people from table_of_people"
then loop through it:

.movefirst
dim result as string
do
if .eof the exit do
result = result + " " + .field("people").value
.movenext
loop

Marco
Reply With Quote
  #5 (permalink)  
Old May 2nd, 2005, 05:23 PM
Registered User
 
Join Date: Mar 2005
Location: Reno, NV, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to boneill Send a message via MSN to boneill
Default

Thanks!

-Brian O'Neill
Reply With Quote
Reply


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
ADODB.Connection user-defined type not defined Wall st Guru Excel VBA 2 March 26th, 2014 03:44 PM
Appl-defined or Object-defined error 1004 chp Excel VBA 3 April 4th, 2006 08:12 AM
User-defined type not defined (Icecream.mdb) dloren01 BOOK: Beginning Access VBA 0 June 22nd, 2005 10:36 PM
VB.Net -> Filename -> DTS Package -> tempdB daniel Pro VB.NET 2002/2003 1 October 7th, 2004 01:46 PM
Passing user defined parameters to vb dll Smita VB How-To 0 March 29th, 2004 04:49 AM



All times are GMT -4. The time now is 06:47 AM.


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