Results 1 to 2 of 2

Thread: SQL to ASP

  1. #1
    Join Date
    Dec 1969

    Default SQL to ASP

    I noticed someone asked pretty much the same question a bit eariler however I seek to knowlege and not just to copy and past an anwser, so if I may indulge for a simple explination that would be great, thanks.<BR><BR>Counts Records using SQL<BR>I have<BR>sql_count = "SELECT COUNT(*) FROM table_name"<BR>I assume that above code is correct?<BR>my problem is I do not yet understand how is it that I take my newly formed SQL statment and then utilize it though asp. I always see things like<BR>set rs=connection.execute(sql_count) <BR>or somthing to that effect but I don&#039;t really know what I am doing with that and yet still how to out put the number that is returned by SQL. <BR><BR>Thank you for any help on this matter.

  2. #2
    Join Date
    Dec 1969

    Default Your best bet is to...

    ... read some articles on retrieving data from databases. There are FAQs and articles out there that would explain it better than a 30 second post by us.<BR><BR>It would also be good for you to read posts about GROUPING and getting totals from a database.<BR><BR>As for reading the value from the SELECT COUNT(*), because whoever posted that isn&#039;t giving the field a name, you need to refer to the field by number (starting from 0):<BR>Response.Write rs(0).Value<BR><BR>-Doug

Posting Permissions

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