var db = {
commandText: "",
connectString: "Provider=Microsoft.Ace.OLEDB.12.0; Data Source=D:\\db1.accdb",
conn: new ActiveXObject("adodb.connection"),
open: function () { return this.conn.Open(this.connectString); },
close: function () { return this.conn.Close(); },
exec: function () { return this.conn.Execute(this.commandText); }
};
var i = user.id ;
i = user.add() ;
i = user.id ;
try {
db.open();
db.commandText = "select * From [user]" ;
var rs = db.exec();
while(!rs.EOF) {
var id = rs("userid");
var name = rs("name");
WScript.Echo( id + " " + name);
rs.MoveNext();
}
rs.Close();
db.close();
}catch(e)
{
WScript.Echo(e.message);
}