Error on insert in table F_DOCLIGNE

Cette section est consacrée aux développements d'applications interfacées avec les logiciels Sage.

Modérateurs: Super-Apogea, Super Modérateur

Error on insert in table F_DOCLIGNE

de kervb » Ven 21 Oct 2011 14:52

Hello,

I have a software which create sales document automatically in Sage Trading by writing directly in the SQL Server database. While running the module which carried out this process I have got the following error message:
"[Microsoft][ODBC SQL Server Driver][SQL Server] violation of UNIQUE KEY constraint 'IDL_NO'. Cannot insert duplicate key in object 'F_DOCLIGNE' "

Can you please help?

Thanks. :)
Posteur néophyte
Posteur néophyte
 
Messages: 4
Inscription: Ven 21 Oct 2011 14:39

Re: Error on insert in table F_DOCLIGNE

de Recce007 » Mar 1 Nov 2011 11:42

Hello,
Could you be more explicit about your environment?
Are you using Sage ODBC to push data in Sage DB? In this case, you insert command should allocate 0 to DL_No (the system will store the correct value itself).

Rgds,
Contributeur
Contributeur
 
Messages: 60
Inscription: Mer 8 Avr 2009 11:19

Re: Error on insert in table F_DOCLIGNE

de drissoft » Mar 4 Déc 2012 17:01

Hi evryone i have the same problem ,this is my command ,i set DL_NO =0 but i still get the same error

insert into F_DOCLIGNE (DO_DOMAINE ,DO_TYPE ,DE_NO ,DL_NO,dl_ligne ,dl_trempied ,DL_TRemExep,DL_QteBC ,DL_QteBL,
DL_PoidsNet,DL_PoidsBrut,DL_Remise01REM_Type,EU_Qte,DL_TTC,DL_Valorise,EU_Enumere,
DL_Qte,DO_PIECE,AR_REF,DL_PrixUnitaire,dl_taxe1,DL_MontantHT,DL_MontantTTC)
select 0,6,0,0,0,0,0,1,1,0,0,0,1,0,1,'Pièce',1,[FCL INV],Article,prix,TAXE,prix,(prix+(prix*(TAXE/100)))
FROM LIGNES$
Posteur néophyte
Posteur néophyte
 
Messages: 8
Inscription: Ven 21 Oct 2011 16:42


Qui est en ligne
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 1 invité