View Single Post
Old 01-21-2013, 08:40 PM   PM User | #8
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,210
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
NOTHING is the VBScript equivalent of null in JS.

You can try it. Dunno if it will work.

Code:
var connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='database.mdb'";
var adoconn = new ActiveXobject("ADODB.Connection");
adoconn.Open(connString);
var adoRS = new ActiveXobject("ADODB.Recordset");

var strSQL = "Select SUM(database_column_name) As Total FROM xMarvin";
adoRS = adoconn.Execute(strSQL);
textbox1.value = adoRS.Fields(0);
adoRS.Close();
adoRS = null;

... so your update ...

adoconn.Close();
adoconn = null;

var adoconn = new ActiveXobject("ADODB.Connection");
adoconn.Open(connString);
adoRS = adoconn.Execute(strSQL);
textbox1.value = adoRS.Fields(0);
adoRS.Close();
adoconn.Close();

// if needed:
adoRS = null;
adoconn = null;
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Users who have thanked Old Pedant for this post:
tequilasunsette (01-22-2013)