TextBox (SQL)

Results 1 to 2 of 2

Thread: TextBox (SQL)

  1. #1
    Daniel Guest

    Default TextBox (SQL)

    i have a textBox and a search button. I woul like to enter the ClientNumber (wich is on of my recordset in my Table Client) then i would like to make an SQL query that return all the information depending on the ClientNumber entered before...This his a beginner level Query but i&#039m a beginner so thank :)<BR>How can i do that? what would be the ASP code <BR>thanks :)

  2. #2
    Jason Cochran Guest

    Default RE: TextBox (SQL)

    Dim rst, cnn, strSql<BR>Set cnn = Server.CreateObject("ADODB.Connection")<BR>Set rst = Server.CreateObject("ADODB.Recordset")<BR>strSql = "SELECT * FROM YourTable WHERE ClientNumber = &#039" & Request.Form("inputboxnamehere") & "&#039"<BR><BR>cnn.Open "YourDSNhere"<BR><BR>rst = cnn.Execute(strSql)<BR><BR>&#039then you write the data out using the instantiated recordset object<BR><BR>Response.Write rst("ClientName") &#039etc... etc..<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts