插入数据时出错。 [英] Error while inserting a data.

查看:85
本文介绍了插入数据时出错。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。我正在做一个项目,我正在插入会员详细信息。当我输入详细信息并单击保存按钮时出现错误

nvarchar值的转换 9686333295'溢出了一个int列。

我不知道这是什么错误。请帮助我如何解决这个错误。这个号码是电话号码。它被声明为nvarchar()。



谢谢。

Hello every one.I'm doing a project where i am inserting member details.When i enter the details and click save button i am getting a error
"The conversion of the nvarchar value '9686333295' overflowed an int column".
I do not know what error is this.Please help me how can i resolve this error.That number is of phone number.It is declared as nvarchar().

Thank you.

推荐答案

在相关表格中将数据类型Int更改为Nvarchar(或)Bigint
Change the Data type Int to Nvarchar(or)Bigint in relevant table


如果您明确地或隐含地尝试将电话号码字符串转换为整数,则会发生这种情况。例如,请参阅SQL Server错误消息 - 消息248 [ ^ ]。
That happens if you are explicitely or implicitely trying to convert the phone number string to an integer. See, for instance "SQL Server Error Message - Msg 248"[^].


你可以在你的数据库中使用Varchar(Max)数据类型



这绝对可以帮到你



you Can use Varchar(Max) datatype in your database

this will definatly help you out

phoneNo varchar(max),


这篇关于插入数据时出错。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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