file creation
This commit is contained in:
17
webdev/sqltest.js
Normal file
17
webdev/sqltest.js
Normal file
@@ -0,0 +1,17 @@
|
||||
var connection = new ActiveXObject("ADODB.Connection") ;
|
||||
|
||||
var connectionstring="Data Source=<server>;Initial Catalog=<catalog>;User ID=<user>;Password=<password>;Provider=SQLOLEDB";
|
||||
|
||||
connection.Open(connectionstring);
|
||||
var rs = new ActiveXObject("ADODB.Recordset");
|
||||
|
||||
rs.Open("SELECT * FROM table", connection);
|
||||
rs.MoveFirst
|
||||
while(!rs.eof)
|
||||
{
|
||||
document.write(rs.fields(1));
|
||||
rs.movenext;
|
||||
}
|
||||
|
||||
rs.close;
|
||||
connection.close;
|
Reference in New Issue
Block a user