Forums

ASP

This topic is locked

Order By

Posted 27 May 2008 18:41:30
1
has voted
27 May 2008 18:41:30 Jennifer Pitts posted:
I have this code and I'm trying to put an ORDER BY CName (name of column) but everytime I put it in I still get the same results as before and they are not ordered by Company Name. What am I doing wrong?

set objConn = ficpa.getNetLinkDBConnection()

Set objRS = Server.CreateObject("ADODB.Recordset"
strSQL = "SELECT * from nfprequest where address is null or address = ' ' "
'strSQL = "SELECT * from nfprequest"

objRS.Open strSQL, objconn, 3, 3

do while Not objRS.EOF
objRS.MoveFirst
objRS.Delete
objRS.MoveNext
loop

objRS.Close
Set objRS = Nothing

strSQL = "SELECT * FROM nfprequest"
ORDER BY CName

set objRecordset = Server.CreateObject("ADODB.Recordset"
objRecordset.Open strSQL, objConn, 3, 3

%>

Reply to this topic