Forums

This topic is locked

Check To see if Data exists before insert

Posted 16 Sep 2003 18:48:56
1
has voted
16 Sep 2003 18:48:56 Greg LeBreck posted:
In ASP with SQL DB

I have created an insert form and it works. Problem is when I try to insert something tha already exists I get an error page. I would rather have it redirect to a page that I create that tells the user the data already exists.

How would I do that?

Replies

Replied 17 Sep 2003 10:45:22
17 Sep 2003 10:45:22 Wayne Hultum replied:
What are you inserting? If it's details from a registration form there is a server behavior that lets you check if username already exists.
Replied 17 Sep 2003 17:11:21
17 Sep 2003 17:11:21 Julio Taylor replied:
As far as i am aware, you can use the default MX 'check username' behaviour for other purposes with a little tweaking. in the end it's only checking for identical fields, the script doesn't really care what you're trying to input.

------------------------
Julio

PHP | MySQL | DWMX

ICQ: 19735247
MSN:

Reply to this topic