Search Search

#1 worldwide
FREE Coding Lessons

since 1996
   THE BEST WAY to learn ASP & Asp.net!
Advertise Here!
click for details
Credits Host:
DiscountASP.net
Server Admin:
The "Team"
Contact Info.
Charles M. Carroll

my Blog
[prev. Lesson]  advice: Encode with Redirects
     [next Lesson]  advice: Named constants for ADO are better

ASP Commandment #3: write that SQL

Command #3: use a string variable to build the SQL string so it can be displayed and debugged if there is a problem.

This is bad:
set rstemp=conntemp.execute("select * from publishers where state='NY')

This is good:
mySQL= ""select * "
mySQL= mySQL & "from publishers"
mySQL= mySQL &  "where state='NY'"
response.write mySQL
set rstemp=conntemp.execute(mySQL)
rstemp.close
set rstemp=nothing

There are many worthy charities!!. But perhaps help starving children in Africa or South America AND help Charles too. a $5 tip buys him lunch at McDonalds, a $20 tip buys his kid Hitoshi a new computer game, a $39 tip buys his daughter Michiko a few nice outfits. See our donor list.