Wrote a simple stored proc to list out names which have one param to see whether is it a full listing or whether is it based on alphabetical
Code:
CREATE PROCEDURE usr_listcontractors(@sortby varchar(2))
as
If @sortby ='fl'
select * from contractor where deleted ='N' order by 'CName'
else
select * from contractor where cname like @sortby+"%" and deleted ='n' order by 'CName'
GO
The above works fine in query analyser (exec usr_listcontractors)
Under my ASP page,
Code:
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString=mstrConnectionString
objConn.open
strcontractors= "usr_listcontractors fl"
Set objRS= Server.CreateObject("ADODB.Recordset")
objRS.Open strcontractors,objConn,1,3
objRS.PageSize = 15
objRS.CacheSize = objRS.PageSize
intPageCount = objRS.PageCount
intRecordCount = objRS.RecordCount
.
.
.
The above is supposed to show up the full listing of contractors. But nothing shows up on the ASP page.
But if i were to execute "usr_listcontractors fl" in query analyser, the result displays promptly.
What am I missing out? Please advise. I believe the issue is with the ASP scripts.
Thanks.
