.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 8th, 2003, 08:15 PM
fishwing fishwing is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 3 fishwing User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
No result be shown in List, plzzzzzzzzz help

<img border="0" src="/forum/emoticons/jumpin.gif" height="31" width="31" alt="jumpin" /> <br><br>Hello,<br><br>I'm using ASP.net to build a Mobile page. I want to get data from SQL and show the data in the mobile List, however, List never comes out.... and no data at all.<br>Here is my coding:<br><br>Private Sub SightSeeingSpot_Activate(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SightSeeingSpot.Activate<br><br> Dim conn As SqlConnection = New SqlConnection("Server=localhost;UID='sa';PWD='';Database=Hotel")<br> Dim sql As String = "Select * from Sightseeing where name = '" & SelectionList2.Selection.Text & "' "<br> Dim dr As New SqlCommand(sql, conn)<br> Dim reader As SqlDataReader<br> Dim values As ArrayList = New ArrayList()<br><br> conn.Open()<br> reader = dr.ExecuteReader()<br> While reader.Read()<br> values.Add(reader.Item("Location").ToString())<br> End While<br> List1.DataSource = values<br> List1.DataMember = "Sightseeing"<br> List1.DataBind()<br> conn.Close()<br> reader.Close()<br><br> End Sub<br><br>Could anyone be kind to advise me how to solve the problem? I'm really in a hurry.......... Plzzzzzzzzzzzzzzzzzzzzzz help.... Many many thx.<br><br>Winnie

Reply With Quote
  #2  
Old May 13th, 2003, 10:57 PM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
Set a breakpoint on this line:<br><br>Dim sql As String = "Select * from Sightseeing where name = '" & SelectionList2.Selection.Text & "' "<br><br>Verify that the selection text actually contains a value. Sounds like your reader is empty.

Reply With Quote
  #3  
Old May 14th, 2003, 09:51 AM
fishwing fishwing is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 3 fishwing User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Dear dcarva,<br><br>will try it. thx so much. <img border="0" src="/forum/emoticons/roll.gif" height="15" width="50" alt="roll" />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > No result be shown in List, plzzzzzzzzz help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT