<!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <table border="1" cellpadding="0" cellspacing="0"> <tr> <% Response.Buffer=TRUE ON ERROR RESUME NEXT dim conn,rs set conn=Server.CreateObject("ADODB.Connection") conn.connectionstring="Provider=SQLOLEDB.1;Data Source=MANIADSBHI-PC\SQLEXPRESS;Initial Catalog=master;UID=sa;Password=picme123;" conn.Open response.write err.number &" 1- " &err.description IF Err.Number<>0 THEN err_flag=true err_msg=err_msg+"<br><H2>Connection Error, Report can not be Generated</H2>" Err.Clear END IF set rs = Server.CreateObject("ADODB.recordset") rs.MaxRecords=20 str="SELECT * FROM Persons" set rs=conn.execute(str) response.write err.number &" Rs - " &err.description &"<br>" if rs.EOF then Response.Write("No Records available") else do while not rs.EOF response.Write("Person Details:") & rs("PersonId") &"-" &rs("LastName") &"-" &rs("FirstName") &"-" &rs("Address") &"-" &rs("City") &"<br>" rs.MoveNext loop End if %> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)