outputing a query

Results 1 to 2 of 2

Thread: outputing a query

  1. #1
    Join Date
    Dec 1969

    Default outputing a query

    Is there a set format for outputing the results of a select query, or does it all depend on what the query is?<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: outputing a query

    From my knowledge of working with ASP for the last month, the answer is YES. There are different ways of outputing the results of a query .....<BR><BR>If you have something like this.......<BR>SQL="SELECT fname, lname, id from table WHERE..."<BR>response.write SQL<BR>DbObj.Execute SQL<BR><BR>Response.Write oRs("fname")<BR>Response.Write oRs("lname")<BR>Response.Write oRs("id")<BR><BR>OR, if you want the output in a table you do this.....<BR>&#060;%=oRs("First_Name") %&#062; between each &#060;td&#062; tags<BR><BR>or you can set fields as variables like this.....<BR><BR>Form_FName=oRs("fname")<BR>Form_L Name=oRs("lname")<BR>and output the variable instead<BR><BR>Another thing. If your SQL goes like this....<BR>SQL="SELECT fname As FirstName, lname As LastName FROM table..."<BR>then you output the Alias like this....<BR>response.write " & oRs("FirstName")<BR>response.write " & oRs("LastName")<BR><BR>I hope i answered your question. Good Luck

Posting Permissions

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