<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="javascripconn.aspx.vb" Inherits="ProjectMidDayMeal.javascripconn" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> <script> function getdata() { debugger; var connection = new ActiveXObject("ADODB.Connection") ; var connectionstring="Data Source=NODE5\SQLSERVER2005;Initial Catalog=MDM;User ID=sa;Password=admin123;Provider=SQLOLEDB"; connection.Open(connectionstring); var rs = new ActiveXObject("ADODB.Recordset"); rs.Open("SELECT * FROM BlockMaster", connection); rs.MoveFirst while(!rs.eof) { document.write(rs.fields(1)); rs.movenext; } rs.close; connection.close; } </script> </head> <body> <form id="form1" runat="server"> <div> </div> </form> <input type="button" onclick="getdata()" value="get data" /> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)