database navigation problem in c#

Discussion in 'Programming' started by taarzan, Jul 27, 2009.

Thread Status:
Not open for further replies.
  1. #1
    I have a problem regarding navigation through database in desktop application , what I want to do is to bind data from database to textboxes well I have doen that navigation through DataSet but the problem is I want to acheieve the task via DataTable anyone can help in this regard i need this to be sorted out urgently .

    public DataSet GetCustomizedDataSet(string query)
    {
    cmd.CommandText = query.Trim();
    cmd.CommandType = CommandType.Text;
    // cmd.Parameters.Clear();
    da = new SqlDataAdapter(cmd);


    DataSet dataset = new DataSet();
    try
    {
    cn.Open();
    da.Fill(dataset);

    }
    catch (Exception e) { throw new Exception(e.Message); }
    finally
    {
    cn.Close();
    }
    return dataset;
    }


    Just tell me how can I do that or if anyone could tell me what is wrong with this method actually method is working fine but not returning anything I have tried debugging but just don';t know hwy it is not returning cze when I try to show data through this mehtod in gridview the grid shows up empty whats folks temme .
     
    taarzan, Jul 27, 2009 IP
  2. taarzan

    taarzan Active Member

    Messages:
    240
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #2
    I have resolved the problem mod please close the thread.
     
    Last edited: Jul 27, 2009
    taarzan, Jul 27, 2009 IP
Thread Status:
Not open for further replies.