Wrox Programmer Forums
|
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 2nd, 2006, 07:45 AM
Registered User
 
Join Date: Jan 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default listbox additems

Hello!

i'm populating my listbox with a "select" statement that retrieves me informaton to fill up multiple columns, but this information stays completely mixed in the listbox. i'm using this code:

While Not rs_nomes.EOF
    list_result.AddItem rs_nomes(0).Value, 0
    list_result.AddItem rs_nomes(1).Value, 1
    list_result.AddItem rs_nomes(2).Value, 2
    list_result.AddItem rs_nomes(3).Value, 3
    list_result.AddItem rs_nomes(4).Value, 4
    list_result.AddItem rs_nomes(5).Value, 5
    rs_nomes.MoveNext
 Wend
how can put the information by columns?
thanks

 
Old February 2nd, 2006, 07:59 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Not sure what you're asking here. Can you give more details?

Is this about classic ASP or about ASP.NET 2.0? If the latter, why are you using old skool recordset stuff like EOF and MoveNext?

Imar
 
Old February 2nd, 2006, 08:08 AM
Registered User
 
Join Date: Jan 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i'm using vb6.
i want that each row inside the "while" be a column in my listbox. i'm using recordset because i'm just adding an adicional function to an old project..
thanks for the help

 
Old February 2nd, 2006, 09:21 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

In that case, you better repost this question in a VB 6 forum located here: http://p2p.wrox.com/visual-basic-13

The forum you posted your question in is about Visual Studio 2005....

Imar


 
Old March 24th, 2006, 10:52 AM
Authorized User
 
Join Date: Oct 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try separating the items with semicolons:
rst.fields(0) & ";" & rst.fields(1) & ";" & rst.fields(3)

vmz





Similar Threads
Thread Thread Starter Forum Replies Last Post
ListBox obrienkev C# 2005 4 November 6th, 2007 03:15 AM
multiple Listbox values in another listbox terryv Excel VBA 0 June 27th, 2007 07:01 AM
Help with listbox MMJiggy62 Beginning VB 6 5 July 11th, 2006 10:56 PM
About listbox csc820203 C# 1 April 29th, 2004 06:17 AM
I'm back :) Listbox var from listbox MichaelTJ .NET Web Services 2 October 21st, 2003 07:06 PM





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