Hi guys,
(Using .net cf 2.0)
I have the following insert statement:
VB Code:
With sqlCmd .CommandText = "INSERT INTO photos(visitID, photoType, photoLocation, havePhoto)VALUES(@visitID, @photoType, @photoLocation, @havePhoto)" .Parameters.Add(New SqlCeParameter("@visitID", GetCurrentVisit())) .Parameters.Add(New SqlCeParameter("@photoLocation", photoLocation)) .Parameters.Add(New SqlCeParameter("@photoType", photoType)) .Parameters.Add(New SqlCeParameter("@havePhoto", "Y")) .ExecuteNonQuery() .Parameters.Clear() End With
But i only want it to do the insert if the value in photoLocation doesn't already exist?
How can i go about doing this?
Thanks in advance for any help
![]()


Reply With Quote


