ASP VB SCRIPT MS SQL Table - how to implement plugin
ASP VB SCRIPT MS SQL Table - how to implement plugin
HI,
I am trying to implement 'DataTables' into my ASP VB SCRIPT page...
Basically, I am using basic ASP and VBSCRIPT to get data from MS SQL database and create a table.
I spent few days trying to find out how to but no luck.. .
I wonder if you can help me...
Is there any way to implement 'DataTables' with ASP and VBSCRIPT?
I can use only IIS server....
Thanks in advance...
Below is my code:
[code]
DataTables example
@import "demo_page.css";
@import "demo_table.css";
$(document).ready(function() {
$('table').dataTable( {
"aaSorting": [[ 4, "desc" ]]
} );
} );
<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=SQLOLEDB; Data Source=xxxxxxxx; Initial Catalog=xxxxxx; User ID=xxxxxx; Password=xxxxxxxx"
objConn.Open
DIM mySQL
mySQL = "SELECT * FROM data_table"
DIM objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL, objConn
%>
table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
Server
Tag
OS
Model
Memory
<% DO WHILE NOT objRS.EOF %>
<% Response.Write objRS("server") %>
<% Response.Write objRS("tag") %>
<% Response.Write objRS("os") %>
<% Response.Write objRS("model") %>
<% Response.Write objRS("memory") %>
<%
objRS.MoveNext
Loop
%>
<%
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
[/code]
I am trying to implement 'DataTables' into my ASP VB SCRIPT page...
Basically, I am using basic ASP and VBSCRIPT to get data from MS SQL database and create a table.
I spent few days trying to find out how to but no luck.. .
I wonder if you can help me...
Is there any way to implement 'DataTables' with ASP and VBSCRIPT?
I can use only IIS server....
Thanks in advance...
Below is my code:
[code]
DataTables example
@import "demo_page.css";
@import "demo_table.css";
$(document).ready(function() {
$('table').dataTable( {
"aaSorting": [[ 4, "desc" ]]
} );
} );
<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=SQLOLEDB; Data Source=xxxxxxxx; Initial Catalog=xxxxxx; User ID=xxxxxx; Password=xxxxxxxx"
objConn.Open
DIM mySQL
mySQL = "SELECT * FROM data_table"
DIM objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL, objConn
%>
table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
Server
Tag
OS
Model
Memory
<% DO WHILE NOT objRS.EOF %>
<% Response.Write objRS("server") %>
<% Response.Write objRS("tag") %>
<% Response.Write objRS("os") %>
<% Response.Write objRS("model") %>
<% Response.Write objRS("memory") %>
<%
objRS.MoveNext
Loop
%>
<%
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
[/code]
This discussion has been closed.