Databinding ASP .Net

Posted: April 15, 2008 in ASP .Net
Tag:, , , ,

import Namespace="System.Data.OleDb"

Sub Page_Load()
Dim dbconn, sql, dbcomm, dbread
dbconn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source="
Server.MapPath("/db/northwind.mdb"))
dbconn.Open()
sql = "SELECT * FROM Invoices"
dbcomm = New OleDbCommand(sql, dbconn)
dbread = dbcomm.ExecuteReader()
ObjInvoices.DataSource = dbread
ObjInvoices.DataBind()
dbread.Close()
dbconn.Close()
End Sub

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s