Wednesday, 28 May 2014

Classic ASP Page Sample Page
Name
Post Next page Stored Procedure and Retrieval Date Classic ASP page <% 'Variable Declaration Dim strcon,sqry,StrGender,SQL,names,rs,cmd,ORC,adocmd,conn 'Connection String Set strcon=Server.CreateObject("ADODB.Connection") 'Database Connection String strcon.open "PROVIDER=SQLOLEDB.1;DATA SOURCE=L04webche012;UID=demo;PWD=demo;database=Demo" 'Parameter Set adocmd = Server.CreateObject("ADODB.Command") With adocmd Set .ActiveConnection = strcon 'Stored procedure Value .CommandType = 4 .CommandTimeout = 180 'Procedure Name .CommandText = "sample_getvalue" 'Parameter Value .Parameters.Append .CreateParameter("@names", 200, 1, 30, Request.Form("Name")) Set ORC = .Execute response.Write "Successfull" End With %> <% set rs = SERVER.CreateObject("ADODB.RecordSet") SQL="select id,Names from sampe " rs.Open SQL,strcon if not rs.EOF then do while not rs.EOF %> <% rs.MoveNext loop end if %>
id Name
<%= RS.Fields("id")%> <%= RS.Fields("names")%>

No comments:

Post a Comment