Home » 2011 » August » 30

Archive for August 30, 2011

Select Count * (count total of records)

VB.NET Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then Try ‘/ access db connection – MS Access 2007/10 ‘ driver * you can define your own sql connection Dim ConnDB As New OleDbConnection(“Provider=Microsoft.ACE.OLEDB.12.0; Data Source=” & Server.MapPath(“my_db.accdb”)) ‘/ open connection ConnDB.Open() Dim cmd As New OleDbCommand(“select count(*) from table1 […]