Stran 1 od 1

reading and writing in the winform using the access database

OdgovorObjavljeno: To Avg 21, 2018 10:06 am
Napisal/-a sakurasanta86
I would ask you for one help.

Namret, somehow I fail to be able to read and write in and from the access file, test.mdb file.

I'm open with:

OleDbConnection conn;
OleDbCommand comm;
OleDbDataReader dr;
conn = new OleDbConnection ("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C: \\ CollectionData1.mdb");
comm = new OleDbCommand ("Select * from emp", conn);
conn.Open ();
dr = comm.ExecuteReader ();

/ * DataGrid1.DataSource = dr;
DataGrid1.DataBind (); * /
// conn.Close ();


How should I use it for reading, what would be best to print, listbox or anything else?

Thank you