hi Mike
Thanks for responding. I should have made my question clearer, I understand
how to check for EOF in a recordset.
What I needed to know was, I would like to warn the user without needing to
do another round trip to the server, ie I would like to avoid:
- user clicks update
- server script obtains recordset and checks EOF
- server sends client another version of the same page with a warning included
Thanks!
> > hi all
> >
[quoted text clipped - 15 lines]
> --
> Mike Brind
John Blessing - 04 Mar 2007 08:39 GMT
> hi Mike
>
[quoted text clipped - 12 lines]
>
> Thanks!
The only way you are going to know is by doing a query on the database.
Either do it before so your data entry page has the info it needs to
validate (and that might be a lot of info), or after, once you know what
the user has entered. Personally I would do the latter

Signature
John Blessing
http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook, find/replace,
send newsletters
AndyK - 04 Mar 2007 17:04 GMT
Thanks John I will try it that way
> > hi Mike
> >
[quoted text clipped - 17 lines]
> validate (and that might be a lot of info), or after, once you know what
> the user has entered. Personally I would do the latter
Mike Brind - 04 Mar 2007 19:26 GMT
As John said, you can't know if something exists in the database unless you
query it, so you will have to send a server request. A more "user-friendly"
way to do this might be to use the xmlhttprequest object and send a request
via javascript behind the scenes. You get your information from the
database without the page refreshing or the submit button needing to be
clicked.
Use the onlostfocus event of your username/password inputs.
http://www.w3schools.com/ajax
--
Mike Brind
> hi Mike
>
[quoted text clipped - 34 lines]
>> --
>> Mike Brind