I have the following code that updates a SQL database with a record. This works fine.
What I’d like to do is produce another Response.Redirect if the record already exists.
Can anyone help?
Thanks.
Ah dinnae ken...
Code:
For i = 0 to Ubound(num)
if len(num(i))=2 then
rs = "INSERT INTO Model ([BusinessID], [Model Code], [Model Description])"
rs = rs & " VALUES"
rs = rs & "('" & first_part & "', '" & num(i) & "', '" & "Model Code " & num(i) & " for Business " & second_part & "')"
else
Response.Redirect("test.asp?a=not a valid entry")
end if
Set obj_RS1 = obj_CN.Execute(rs, adBoolean)
Next
Response.Redirect("test.asp?a=added")
What I’d like to do is produce another Response.Redirect if the record already exists.
Can anyone help?
Thanks.
Ah dinnae ken...