|
-
Apr 29th, 2004, 11:40 PM
#1
Thread Starter
New Member
SQL return result
the sqlStatement is a select * from table name
objConn.Open();
OleDbDataAdapter dataReader=new OleDbDataAdapter(sqlStatement,objConn);
dataReader.Fill(dataHolder,"Cust_Info");
DataView objDataview=new DataView(dataHolder.Tables["Cust_Info"]);
custinfo.DataSource=objDataview;
custinfo.DataBind();
objConn.Close();
i wan to do something like
if recordset.EOF Then
Response.write "No result found"
instead of displaying the datagrid with the headers and no data
would like to add a message that says that no result found
-
Apr 30th, 2004, 12:27 AM
#2
Thread Starter
New Member
SOLVED ahh......
hmm i used Datatable instead of dataview
if (DataTable.Row.Count==0)
{
//no result found message
}
else
{
//do display on datagrid wwatever
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|