This topic is locked

Message Issues

6/22/2009 10:14:23 PM
ASPRunnerPro General questions
B
bpawlowski author

Here's my problem. The Message is displaying when the record is added, and when it's not added. What do I need to add/do in order for the message to only display when the record is not added?
message="This Venue already exists. Please either enter a new Venue name, or proceed back to the list page."

str = "select * from Venue where Venue_Name='" & values("Venue_Name") & "'"

Set rstmp = server.CreateObject("ADODB.Recordset")

rstmp.open str,dbConnection

if not rstmp.eof then

response.write("Message")

BeforeAdd = False

else

BeforeAdd = True

end if

rstmp.close

set rstmp=nothing
Any help is greatly appreciated.
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=12115&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />

J
Jane 6/25/2009

Hi,
try to use this one:

str = "select * from Venue where Venue_Name='" & values("Venue_Name") & "'"

Set rstmp = server.CreateObject("ADODB.Recordset")

rstmp.open str,dbConnection

if not rstmp.eof then

message="This Venue already exists. Please either enter a new Venue name, or proceed back to the list page."

BeforeAdd = False

else

BeforeAdd = True

end if

rstmp.close

set rstmp=nothing

B
bpawlowski author 6/29/2009

Hi,

try to use this one:


Worked like a charm...thank you.
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=42253&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />