Click here to Skip to main content
15,896,505 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hai i am binding the value In text box from a table .But it showing Error Conversion from string "Message" to type 'Integer' is not valid.Please Help Me below is my code:

VB
Dim oDt2 As New DataTable
       oDr = oMainForm.oConn.RunQuery("Select * from test")
       oDt2.Load(oDr)
       txtConversation.Text = oDt2.Rows.Item("Message").ToString
       oDr.Close()
Posted

1 solution

You are not indexing your Rows -

Try
txtConversation.Text = oDt2.Rows(0).Item("Message").ToString
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900