Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

ListBox

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-10-2010, 04:00 PM
aru aru is offline
Junior Member
 
Join Date: Feb 2010
Posts: 24
Default ListBox

when iam searching a table field in my database with a text box i want to Show Result in a ListBox Iused Some Methods But It is Not Success

any one can help me?
Reply With Quote
  #2 (permalink)  
Old 03-10-2010, 05:38 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Sorry, but I don't understand exactly what you want to do.
What kind of data do you enter into the Textbox and what result should be displayed in the ListBox.

Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #3 (permalink)  
Old 03-11-2010, 06:25 AM
aru aru is offline
Junior Member
 
Join Date: Feb 2010
Posts: 24
Default ListBOX

Ihave Many Fields Like Student name,address,phone,mobile etc

when iam search the student name via a textbox i want to display the search result in the listbox
can you help me?
Reply With Quote
  #4 (permalink)  
Old 03-11-2010, 09:30 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

You find attached a small program showing a solution.

Best regards.
Attached Files
File Type: sbp ListBox.sbp (1.2 KB, 14 views)
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #5 (permalink)  
Old 03-11-2010, 01:01 PM
aru aru is offline
Junior Member
 
Join Date: Feb 2010
Posts: 24
Default ListBox

Ya I Downloaded The Progaram But it is not cleared my dout

this is my code

Command.AddParameter("STUDENT")
Command.SetParameter("STUDENT",STUDENT.Text)

Reader.New1

Command.CommandText = "select * from studentinfo where studentname=@STUDENT"
Connection.BeginTransaction
Reader.Value = Command.ExecuteReader

Do While Reader.ReadNextRow = True
'ListboxView1.Add(Reader.GetValue(1))

Loop
Reader.Close

Connection.EndTransaction

this is My concept is this possible 'ListboxView1.Add(Reader.GetValue(1))

I thing Now You Can Help Me
Reply With Quote
  #6 (permalink)  
Old 03-11-2010, 03:49 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

You should use:

ListboxView1.Clear
For i=0 to Reader.FieldCount-1
ListboxView1.Add(Reader.GetValue(i))
Next

Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
Reply


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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ListBox and ComboBox klaus Beta Versions 2 02-28-2010 08:48 PM
Help for a Listbox program using DB jotis1 Questions (Windows Mobile) 2 10-12-2009 02:21 AM
Listbox and enter key tsteward Questions (Windows Mobile) 2 10-14-2008 06:30 AM
How to fix ListBox Items? Stellaferox Questions (Windows Mobile) 12 02-22-2008 09:50 AM
listbox = arraylist ? sloopa Questions (Windows Mobile) 1 05-07-2007 12:38 PM


All times are GMT. The time now is 08:43 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0