从字符串“消息”转换输入'Integer'无效。 [英] Conversion from string "Message" to type 'Integer' is not valid.

查看:249
本文介绍了从字符串“消息”转换输入'Integer'无效。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai我正在从表中绑定文本框中的值。但它显示从字符串Message到类型'Integer'的错误转换无效。请帮助我下面是我的代码:



  Dim  oDt2  As   DataTable 
oDr = oMainForm.oConn.RunQuery( 从测试中选择*
oDt2.Load(oDr)
txtConversation.Text = oDt2.Rows.Item( 消息)。ToString
oDr.Close()

解决方案

< blockquote>你没有索引你的行 -



尝试

 txtConversation.Text = oDt2.Rows(0) .Item(Message)。ToString 


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:

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

解决方案

You are not indexing your Rows -

Try

txtConversation.Text = oDt2.Rows(0).Item("Message").ToString


这篇关于从字符串“消息”转换输入'Integer'无效。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆