|
|
sybperl-l Archive
Up Prev Next
From: "venkat Reddy" <chittepu at forindia dot com>
Subject: Messages
Date: May 12 2000 1:40PM
hi,
Suppose the table dosen't contain any data and if I give the select query the query dosen't return any data .
eg: I have one table called xxx and it dosen't contain data.
I give a query to fetch data as
$dbh->dbcmd("select * from xxx);
$exeStatus = $dbh->dbsqlexec;
$resStatus = $dbh->dbresults;
#checking for successfullness
if(($exeStatus == SUCCEED) && ($resStatus == SUCCEED))
{
print "table contents";#these is done using the while loop
}
else
{
print "Table dosen't contain any data";
}
-------------
If I put the above code in the perlscript and run
I have got the out put as
Table dosen't contain any data.
and also I am getting the error messages as
Msg 156, Level 15, State 1 Line 1 Incorrect syntax near the keyword 'from'. DB-Library error: General SQL Server error: Check messages from the SQL Server.
My question is how do I avoid the above message from displaying in the web page ? Are there any special ways to tackle this? Are there any methods?
If the data is there then I have no problem in displaying.
please help me in this matter
see u
venkat
chittepu
e-mail: chittepu@forindia.com
--------------------------------------------------------
Feed Your Greed !!!
Get your 10MB Free space only at http://www.forindia.com NOW!
--------------------------------------------------------
|