Private Sub Form13_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim count As Integer Dim count1 As Integer Dim total As Integer Dim cmd As New OleDbCommand() Dim cmd1 As New OleDbCommand() Dim con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\sachin\db1.mdb;Persist Security Info=True;Jet OLEDB:Database Password=admin") con.Open() cmd.CommandText = "select count(*) from answer where count=1 ;" cmd1.CommandText = "select count(*) from answer where count=0;" count = CType(cmd.ExecuteScalar(), Integer) count1 = CType(cmd1.ExecuteScalar(), Integer) total = count - count1 Me.Label1.Text = total cmd.Connection = con cmd.ExecuteNonQuery() con.Close()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)