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 […]
Archive for the 'total' Tag
Simple Javascript Calculator
This is simple javascript calculator <html> <head> <title>Calculator</title> <script language=”javascript”> var inputstring=” ” function updatestring(value) { inputstring += value; document.calculator.input.value=inputstring; } </script> <style type=”text/css”> #tb-lo { /*background: url(Calc-bg.png); */ height: 222px; width: 198px; padding: 2px 2px 2px 2px; background-image: url(Calc-bg.png); background-repeat: no-repeat; } #td-key { text-align: center; } </style> </head> <body> <form name=”calculator”> <table id=”tb-lo”> […]
Calculating total from recordset using “select case”
Here is code in classic asp Here is example on how to calculate recordset total using “select case” statement. I have calculated essay and resume scholarship values based on records fromĀ two essay and resume tables, and queried results based on applicant-student registration ID or name. Then I calculated “total score” of each student using […]