Hi,


I have an application in which i have to collect a value in variable and compare with a field in database which has many rows or entries. For example variable is a string called 'name'. Now this variable will be compared with a field in database which has many rows of names in it. If value of any row matches with the value of 'name' it will give a message name already exists. If not then a new row will be added.

Basically i have an idea to do it, i will get the number of rows in a variable, run a loop with counter in it. In that i will put the if else codition. But my deliemma is how do i count the number of rows and how do i introduce a loop.

Please need help on this ASAP.

Regards,
Kaushik