On Thu, 7 Nov 2002 15:07:09 -0600 , Nguyen, David M wrote: >I am writting a script using DBI::Oracle to insert user account into >database, before inserting I need to verify to make sure userid is not >already existed. I have script written, ran it but nothing seems happen. >Can someone look into my script and provide me some correction?
I'm sorry, I haven't fully studied your script, which seems to contain far more code for CGI than for DBI, but I'll give one quick tip anyway: create an index in your table on your "userid" field, so that it must be unique. That way, the database will complain and refuse to make a new record if a row for this userid already existed. When that happens, you can still fallback on updating the existing record. -- Bart.