Results 1 to 2 of 2

Thread: SQL return result

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    4

    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

  2. #2

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    4

    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
  •  



Click Here to Expand Forum to Full Width