发生代码错误. [英] occure error in code.

查看:85
本文介绍了发生代码错误.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:-

将varchar值"CO7"转换为数据类型int时转换失败.

Error:-

Conversion failed when converting the varchar value ''CO7'' to data type int.

推荐答案

首先,这不是ASP.Net错误消息.看起来像SQL Server错误消息.

从消息本身来看,这非常清楚.您正在尝试将CO7转换为数据类型INT.这永远不会正确.
First of all this is not an ASP.Net error message. It looks like SQL Server error message.

And from the message itself, it is very clear. You are trying to convert CO7 to datatype INT. This will never go correct.


那不是所有晦涩的错误:"C07"是一个字符串(数据库中的varchar),而不是一个数字(您的编程语言中为int) .您在这里做错了事:
-表列是否正确映射到程序变量?
-是否正确定义了程序变量?
-数据库的设计是否正确?
That''s not all an obscure error: "C07" is a string (varchar in a database), not a number (int in your programming language). You do something wrong here:
- are table columns correctly mapped to program variables?
- are program variables correctly defined?
- was the database correctly designed?


这篇关于发生代码错误.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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