Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 136,409 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,467 people online right now. Registration is fast and FREE... Join Now!




help vb window mobile

 
Reply to this topicStart new topic

help vb window mobile

dingo190
14 Oct, 2008 - 10:10 PM
Post #1

New D.I.C Head
*

Joined: 26 Feb, 2008
Posts: 6

i'd been trying and still can't find out what is wrong with this... need help from you guys.. i am useing combo box..

{} = where the error is

Error" = The column name is not valid. [ Node name (if any) = ,Column name = S9021292C ]"



CODE

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged

        conn.Open()
        Dim sql As String = "SELECT * FROM Data123 WHERE [NRIC]=" & ComboBox1.Items(ComboBox1.SelectedIndex)
        Dim cmd As New SqlCeCommand(sql, conn)
        Dim { reader As SqlCeDataReader = cmd.ExecuteReader }    
While reader.Read()
            txtfirstname.Text = reader.Item("Firstname")
            txtlastname.Text = reader.Item("Lastname")
            txtage.Text = reader.Item("Age")
            txtdob.Text = reader.Item("DOB")
            txtaddress.Text = reader.Item("Address")
            txtpostalcode.Text = reader.Item("PostalCode")
            txtcontact.Text = reader.Item("Contact")
            txtemail.Text = reader.Item("Email")
        End While

        conn.Close()
    End Sub


This post has been edited by dingo190: 14 Oct, 2008 - 10:23 PM
User is offlineProfile CardPM
+Quote Post

thava
RE: Help Vb Window Mobile
15 Oct, 2008 - 04:17 AM
Post #2

D.I.C Regular
Group Icon

Joined: 17 Apr, 2007
Posts: 442



Thanked: 18 times
Dream Kudos: 50
My Contributions
this is in vb.net
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Help Vb Window Mobile
15 Oct, 2008 - 04:54 AM
Post #3

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,992



Thanked: 125 times
Dream Kudos: 8625
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Moved to VB.NET smile.gif
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 12:18PM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month