Opening and reading access Database using csharp
-
Hello everyone, Does anyone know how to open and read the fields of an access database using csharp?If any one does know,please send me the couple of lines that will allow me to do so Thank you Gijoe Bijoe
-
Hello everyone, Does anyone know how to open and read the fields of an access database using csharp?If any one does know,please send me the couple of lines that will allow me to do so Thank you Gijoe Bijoe
Search for ADO.NET on MSDN or codeproject. You can talk to databases using the System.Data namespace. Create a connection, command, then execute it. Pretty straightforward.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: He has a funny face. And he's my son. Judah Himango
-
Hello everyone, Does anyone know how to open and read the fields of an access database using csharp?If any one does know,please send me the couple of lines that will allow me to do so Thank you Gijoe Bijoe
GIven Below is sample code to access 'Employee' table from Access Database named Mydb1.mdb OleDbDataAdapter da = new OleDbDataAdapter(@"Select * from employee", @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydb1.mdb;User Id=admin ; Password=;"); DataSet ds = new DataSet(); da.Fill(ds); DataGrid1.DataSource = ds; DataGrid1.DataBind(); Hope this helps ;) Ravindra Sadaphule MCSD.NET