coldfusion retrieve the index of a record that has just been inserted.
Hello,
I would like to retrieve the index of a record that has just been inserted.
<CFQUERY name="Com_impr" datasource="#session.dbname#">
INSERT INTO Impr_commandes
(SiteName,
ICImp_ID,
ICClient_ID,
ICLivre_ID,
ICProd_ID,
CDate_crea,
ICQuantite
)
VALUES
('#SiteName#',
#Impp#,
#get_Clients.Client_ID#,
#get_Livre.Livre_ID#,
#get_Prod.Prod_ID#,
'#DateFormat(now(),"dd/mm/yyyy")#',
1
)
SELECT Scope_Identity() AS [IC_ID];
</CFQUERY>This buggy!
Is this the best method?
Thank you in advance for your help.
