Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2007-10-31 : 09:24:46
|
I'm trying to catch an error with this code:If TopicTxt.Text = "" Then Lbloutcome.Text = "Your topic was submitted into the database." Else Lbloutcome1.Text = "Duplicate entry topic already in database, topic was not submitted" End IfWhen I enter a duplicate entry I get the Lbloutcome1.text message but if I enter an entry that's not a duplicate it's submitted but I don't get "Your topic was submitted into database". What am I doing wrong |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2007-10-31 : 09:28:48
|
| I'm guessing it's because TopicTxt.Text isn't = ""Also guess this isn't sql server code.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2007-10-31 : 09:30:59
|
| Your correct I'm in the wrong forum will go to another. Thanks. |
 |
|
|
arorarahul.0688
Posting Yak Master
125 Posts |
Posted - 2007-11-01 : 06:45:15
|
| this is not a sql code as much as i know most probably you are wrking in .net technologyso first use the correct format of sql server if u r wrking in sqlas if conditionbegin-------endelsebegin--------endand in ur case your logic is problematic its only checking whether the text box is empty or not its not matching the value present alreadyRahul Arora MCA 07 BatchNCCE Israna, PanipatHRY, INDIA |
 |
|
|
|
|
|