Posted by Colin Spalding on 01/10/06 19:08
My problem is that the 'INSERT INTO' query that sends the records to the
table is dynamically compiled in VBA and and the target table has a two
column primary key. I have made a number of attempts at getting 'WHERE
NOT EXISTS' to cure the problem but so far without success and previous
postings have resulted in advice to create an 'ignore duplicates' index.
This solved the problem in as
much as it allowed the SQL to insert the records that did not already
exist but resulted in the message appearing every time the user ran the
the query. Whilst this is not a major problem it is vaguely irritating
and I would like to find a way to stop it happening. I suspect that the
solution may involve using the @@ERROR command but I am not sure of the
syntax.
Regards
Colin
*** Sent via Developersdex http://www.developersdex.com ***
Navigation:
[Reply to this message]
|