通过安装程序运行应用程序时,它不会存储表中的值 [英] While Running the application through Setup it is not stroring the values in tables

查看:59
本文介绍了通过安装程序运行应用程序时,它不会存储表中的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


通过Windows应用程序,我有一个Windows应用程序和一个Web应用程序,借助于Web应用程序将快速簿记录插入到表中.

在运行该应用程序时,它工作正常,并且将值固定在表中,但是我为该Windows应用程序创建了一个设置,在运行安装程序时,它不将值仅存储在表中,而是将其存储在表中,此后它将出现一些异常喜欢.
INSERT语句与FOREIGN KEY约束"FK__CustomerP__Class__618671AF"冲突.在数据库"FISOFTSP"的表"dbo.CustomerPortal_ClassCode"的"ClassID"列中发生了冲突.

请问这对我有什么帮助..
谢谢!

Hi,
I have one windows application and one web application through windows application inserting a quickbooks records to tables with the help of web application.

While running the application it is working fine and it strong the values into table but i created a setup for that windows application ,while running setup it is not storing the values in to table only one table values it storing, after that it will some exception like .
The INSERT statement conflicted with the FOREIGN KEY constraint "FK__CustomerP__Class__618671AF". The conflict occurred in database "FISOFTSP", table "dbo.CustomerPortal_ClassCode", column ''ClassID''.

what is the pls help me for this one ..
Advance thanks.

推荐答案

您要插入错误的数据.如果主键列没有此数据,则不会从insert语句接受它.如果您具有SQL Server Management Studio,则将其打开并使用sp_help查看FK所在的列,以及它引用的其他表的哪一列.

也可以看看这个..
http://social.msdn.microsoft.com /forums/zh-CN/transactsql/thread/0ba0501d-bc2e-4afc-824e-b75f18a8b491/ [
You are inserting wrong data.If the primary key column doesn''t have this data , it is not going to accept it from insert statement. If you have SQL Server Management Studio, open it up and use sp_help to see which column that FK is on, and which column of which other table it references.

Also have a look on this..
http://social.msdn.microsoft.com/forums/en-US/transactsql/thread/0ba0501d-bc2e-4afc-824e-b75f18a8b491/[^]


你好,
The error is pretty clear.

ClassID is in a foreign key relationship with another table, which does not contain the ID you are trying to insert. Insert the value in the dbo.CustomerPortal_ClassCode master table first, or check and correct the value you are inserting in ClassID in child table



谢谢!!!!!!!!!



Thanks!!!!!!!!!


这篇关于通过安装程序运行应用程序时,它不会存储表中的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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