01-31-2012 03:31 AM
I have juste got this message using a VI to insert datas in my data base on sql server:
ADO Error: 0x80040E14
Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][SQL Server Native Client 10.0][SQL Server]L'instruction INSERT est en conflit avec la contrainte FOREIGN KEY "FK_QUALMES_INST17". Le conflit s'est produit dans la base de données "metroqual", table "dbo.INST", column 'INSTNinv'. in NI_Database_API.lvlib:Rec Create - Command.vi->NI_Database_API.lvlib:Cmd Execute.vi->NI_Database_API.lvlib:DB Tools Insert Data.vi->addQUALMES.vi
Please, i m a beginner in database programming, does someone know the reason i got this error message and what i should do to resolve it?
Thanks in advance
01-31-2012 04:07 AM
Hello Stolas,
This group is for discussion related to SAPHIR's toolkit.
Anyway, error message describes a problem with your INSERT query. It seems that you try to insert data that are not compatible with a PRIMARY KEY of a second table. In other words your "metroqual" table should refer to a PRIMARY KEY contain in an other table. To fix that you have to be sure that you are referring to an existing PRIMARY KEY or change the setting of the constraint in your database.
Hope this will help you. Anyway, if you need further information, the best place to get help is the NI Discussion Forums (forums.ni.com) or LAVA Forum. These forums are monitored and answered by both NI employees and customers.
Regards,
Olivier