I am trying to query anything from this table.
At the moment just trying to get something to return properly.
No matter what query I do, I am always getting !NC!
.
var connection = new ActiveXObject("ADODB.Connection");
//db name, user name, password
connection.Open("CustomerDB","admin","admin123");
var recSet = new ActiveXObject("ADODB.Recordset");
recSet.Open("SELECT * FROM Customers" , connection);
recSet.MoveFirst();
//var sQueryReturned = recSet(0);
//the above was wrong, need something like the below if statement
if (!recSet.eof){
for (var i = 0; i < recSet.fields.count; i++){
var value = recSet.fields(i).value;
var name = recSet.fields(i).name;
}
}
recSet.close;
connection.close;
//sQueryReturned was always populating as !NC!