How to use dataset to contain the data from access databsase

Viewing 1 post (of 1 total)
  • Author
  • #3104

    The following code sample shows that how we can use create dataset or datatable from Access database:

    DataSet ds=new DataSet();
    OleDbConnection con; // create connection
    OleDbCommand com; // create command
    con = new OleDbConnection(“Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\\Program Files (x86)\\ParamSave.mdb”);
    com = new OleDbCommand(“Select * from tblcatagory”, con);
    con.Open(); // open the coinnection
    OleDbDataAdapter oadap=new OleDbDataAdapter(com);

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.