VB.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 308,429 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 3,226 people online right now. Registration is fast and FREE... Join Now!




help vb window mobile

 

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


Posts in this topic
dingo190   help vb window mobile   14 Oct, 2008 - 10:10 PM
thava   this is in vb.net   15 Oct, 2008 - 04:17 AM
PsychoCoder   Moved to VB.NET :)   15 Oct, 2008 - 04:54 AM

Fast ReplyReply to this topicStart new topic

Time is now: 11/24/09 01:48PM

Live VB.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month