Postingan lainnya
Menyambungkan ASP kode ke Database Acces
Permisi saya mau tanya tentang bagaimana menyambungkan ASP dengan database acces...?
0
1 Jawaban:
your code behind
string connection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\\Test1.accdb";
string query = "select * from [Table]"; OleDbConnection con = new OleDbConnection(connection); OleDbCommand cmd = new OleDbCommand(); cmd.CommandText = query; cmd.CommandType = CommandType.Text; cmd.Connection = con; con.Open(); OleDbDataReader dr = cmd.ExecuteReader(); DataTable dt = new DataTable(); dt.Load(dr); con.Close(); testGrid.DataSource = dt; testGrid.DataBind();
your web.config
0