ASP.NET
Dim sales_cutoff As Integer = 1000
Dim myConnection As SqlConnection = New SqlConnection("connection_string"
Dim myCommand As SqlCommand = myConnection.CreateCommand()
myCommand.CommandText = "SELECT title_id, title, ytd_sales FROM
titles WHERE ytd_sales >= @sales ORDER BY ytd_sales DESC"
myCommand.Parameters.Add("@sales", SqlDbType.Int).value
= sales_cutoff
Dim SqlDataAdapter myAdapter = New SqlDataAdapter(myCommand)
Dim topSellers As DataSet = New DataSet()
myAdapter.Fill(topSellers, "titles"
CFML
<CFSET sales_cutoff = 1000>
<CFQUERY NAME="topSellers"
DATASOURCE="dsn">
SELECT title_id, title, ytd_sales
FROM titles
WHERE ytd_sales >=
<CFQUERYPARAM value="#sales_cutoff#" CFSQLType="CF_SQL_INTEGER">
ORDER BY ytd_sales DESC
</CFQUERY>