I have an statement
SELECT * from lkSFSAHousing where id = @.answer
Problem is that id is int and some times @.answer is not int
how would I catch either the error or not even get into not calling
this statement if @.answer is not digit (1 or 2 or 1000)
Can anybody help?
ThanksOn Feb 8, 11:59 am, "Sehboo" <MasoodAd...@.gmail.com> wrote:
> I have an statement
> SELECT * from lkSFSAHousing where id = @.answer
> Problem is that id is int and some times @.answer is not int
> how would I catch either the error or not even get into not calling
> this statement if @.answer is not digit (1 or 2 or 1000)
> Can anybody help?
> Thanks
Ideally, you should have some validation in place at the point where
@.answer is assigned a value. Where/how is this being done?
Monday, March 19, 2012
How to catch errors
Labels:
answerproblem,
catch,
database,
errors,
int,
inthow,
lksfsahousing,
microsoft,
mysql,
oracle,
server,
sql,
statementselect
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment