Page 1 of 1

comparing value in database

Posted: Mon Mar 15, 2004 8:49 am
by gecko
when user enters value, i would like to check whether this value is already present in database and if so return message that the value is already present and then break the entire code, to ensure that the value is not written to the database further down in the code.

any suggestions

thanks

Posted: Mon Mar 15, 2004 10:49 am
by nutstretch
is this field a unique ID field?

I would do a select statement to see if it returned a record with that value and then use an if statement depending what the result was.

Hope this helps