checking that a RECORD EXISTS

Results 1 to 2 of 2

Thread: checking that a RECORD EXISTS

  1. #1
    Join Date
    Dec 1969

    Default checking that a RECORD EXISTS

    Hi,<BR><BR>I am creating a facilty were users can add a new topic to a knowledgebase database table via a form. These topics are then automatically added to a topic pull down menu (Values populated by a database).<BR><BR>Then users can links documents ssociated to the specified topic and they will be available for that topic via a form which executes a sql statement to show all documents for that topic.<BR><BR>Is there a way of checking if a topic exists when they submit the form. I need them to be given a message that the topic exists and the topic can not be added. Otherwise I get lots of topics with the same name appearing in the database populated topic pull down menu.<BR><BR><BR>cheers<BR><BR>Mark<BR><BR>

  2. #2
    JOEL M Guest

    Default RE: checking that a RECORD EXISTS

    Maybe you could do something like this....first send them to one page that would serve to check if it exists and just check the value with a statement like this:<BR>NOTE: this code will probably have syntax error, it&#039s just for the concept.<BR>SELECT * FROM yourtable WHERE thefield LIKE &#039"&querystring&"&#039<BR><BR>then you could do something like this in the body:<BR>IF rs.bof AND rs.eof THEN<BR> &#039forward them to the appropriate data insertion page <BR>ELSE<BR> Response.Write("that item already exists")<BR><BR><BR>hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts