How can I create a text field with a button "search" on the Web.
The thing is I will need to retrive a records from my SQL table and when I will be clicking Search I want fields top show up on my page from this table..
Create a text box and submit button, on click
use method ="post"
next page
use request.form("Name of tHE text field"
u can use ADO to connect to ur database
% Set Conn = Server.CreateObject("ADODB.Connection"
' The following line must be changed to reflect your data source info
Conn.Open "dsnname", "Login", "PASSWWD"
set cmd = Server.CreateObject("ADODB.Command"
set cmd.ActiveConnection = Conn
' Specify the name of the stored procedure you wish to call
cmd.CommandType = 4
cmd.CommandText = "sp_YOUR STOREDPROCEDURE"
cmd.parameters.refresh
cmd.parameters(1).value= Request.form("yourtextboxname"
set rs=cmd.execute()
rs.movefirst
do while not rs.eof
response.write(rs(0))
rs.movenext
loop
</Form>
and the stored procedure which u will call will accept one parameter and it will contain
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.