You could fire an additional SELECT query to see if the item exists before you insert it.
Something along these lines would work:
Code:
Dim rsCheck
Set rsCheck = myConnection.Execute("SELECT 1 FROM MyTable WHERE Column1 = 'SomeValue' AND Column2 = 'SomeOtherValue'")
If rsCheck.EOF Then
' Record does no exist, so go ahead and insert a new one
Else
' Do whatever you need to do when the record exists
End If
rsCheck.EOF
Set rsCheck = Nothing
Does this help??
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to:
Butterflies & Hurricanes by
Muse (Track 10 from the album:
Absolution)
What's This?