输入字符串的格式不正确。 [英] Input string was not in correct format.

查看:71
本文介绍了输入字符串的格式不正确。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我需要帮助。我收到此错误,说输入字符串格式不正确。无法存储<>在价格列中。期望类型是十进制。


这是我的代码下面

Hi. I need help. I am getting this error saying input string was not in a correct format. couldn''t store <> in price column. expect type is decimal.

Here is my code below

展开 | 选择 | Wrap | 行号

推荐答案

适合初学者:

newrow(" ACTSP")=""

newrow(" Ordno")=""


ACTSP被定义为十进制,你试图添加一个字符串。尝试使用:

newrow(" ACTSP")= 0.0


您从未添加过名为Ordno的列。你的数据表,这可能是什么。


你也似乎没有对数据库上的数据库做任何事情?你把这部分代码留了下来吗?

Well for starters:
newrow("ACTSP") = ""
newrow("Ordno") = ""

ACTSPis defined as being a decimal, you''re trying to add a string. Try using:
newrow("ACTSP") = 0.0

You never added a column called "Ordno" to your datatable, so that could be something.

You also don''t appear to be doing anything with your database on that datatable? Did you leave that part of the code out?


嗨。我需要帮助。我收到此错误,说输入字符串格式不正确。无法存储<>在价格列中。期望类型是十进制。


这是我的代码下面
Hi. I need help. I am getting this error saying input string was not in a correct format. couldn''t store <> in price column. expect type is decimal.

Here is my code below
展开 | 选择 | Wrap | 行号


well ,ordno是as400中数据库的列字段,这是我的其余代码
well, the ordno is a column field of my database in as400, Here is rest of my code
展开 | 选择 | Wrap | 行号



well,ordno是我的数据库的列字段,在as400,
well, the ordno is a column field of my database in as400,



我收集了这个,但你似乎没有对你的数据库做任何事情。您设置了一个连接并设置了一个命令,但从不执行该命令或从中填充数据表。


您是否仍然收到错误?

I had gathered that, but at no time do you appear to DO anything with your database. You set up a connection and set up a command, but never execute the command or populate your datatable from it.

Are you still getting errors though?


这篇关于输入字符串的格式不正确。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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