February 1, 2007 at 4:35 pm
Consider the following snippet of ASP script:
Set oConn = CreateObject("ADODB.Connection")
oConn.Open "MyDatabaseConnectionString"
departmentId = Request.QueryString("deptId")
sSql = "SELECT * FROM Employees" _
& "WHERE department_id=" & departmentId _
& "ORDER BY last_name, first_name"
Set oRs = oConn.Execute(sSql)
What issues exist in the above code? Consider both coding syntax as well as best practices.
February 1, 2007 at 5:17 pm
...
sSql = "EXEC dbo.DepartmentEmployees " _
& "@department_id = " & departmentId
Set oRs = oConn.Execute(sSql)
_____________
Code for TallyGenerator
February 1, 2007 at 6:16 pm
Considering your other post... this looks a lot like a take-home exam...
--Jeff Moden
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply