|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Append Query Question
Hi all, on my CF page I am currently using the following statement to
run an append query in my Access database: <cfstoredproc procedure = "Web_2006_Step_1" datasource="customer"> The problem is that I get an error message from CF saying the query cannot be run because it would create duplicate values in the primary key. In Access, I usually just say ok, and it inserts the non-duplicate records. Is there a way for this to happen when calling the query from the CF page? Thanks in advance !! |
|
#2
|
|||
|
|||
|
Hi,
I think you will have to make this change in your stored procedure not to consider duplicate values. In your case database is throwing SQL Exception which coldfusion is catching and throwing it to you. Thanks. ------------------------------------------------------------------ Quote:
|
|
#3
|
|||
|
|||
|
Quote:
If you are using MX version of CF, then you need to be using Components and cfscript to connect to your stored procedure. Then, add the parameters to your component and query except for the id . do the same with your stored procedure (take out any reference to your primary key.) It sounds as if you have the table set to auto generate and doing so won't allow you to explicity define a value for the field. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Cold Fusion Development > Append Query Question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|