|
 |
asp_databases thread: ORA-00936 missing expression
Message #1 by fione0212@h... on Thu, 19 Jul 2001 01:09:06
|
|
hi
I'm not sure why I always get this message when I try to test out my page.
here is the message:
Microsoft OLE DB Provider for Oracle error '80040e14'
ORA-00936: missing expression
/orgchart1/default.asp, line 27
and here is the code:
Dim objRecordset
Dim varSQL
Dim varEmpno
varSQL = "SELECT crw_employees.empno, crw_employees.ename_last, " & _
" crw_employees.ename_first,
crw_employees.phone, " & _
" crw_employees.location,
crw_employees.title, " & _
" crw_employees.expertise,
crw_employees.job_description, " & _
" FROM crw_employees " & _
" ORDER BY desc "
Set objRecordset = GetDBConnection().Execute(varSQL)
Response.Write "<TABLE BORDER=1><TR>" & _
" <TD>Employee No.</TD> " & _
" <TD>First Name </TD> " & _
" <TD>Last Name</TD>" & _
" <TD>Phone </TD> " & _
" <TD>Location </TD> " & _
" <TD>Title </TD> " & _
" <TD>Expertise</TD> " & _
" <TD>Job Description </TD> " & _
"</TR>"
Do While Not objRecordset.EOF
varEmpno = objRecordset.Fields("empno")
Response.Write "<TR>" & _
" <TD><A Href=EditEmp.asp?
Empno=" & varEmpno & " >" & _
objRecordset("empno") & "</A></TD>" & _
" <TD>" & objRecordset
("ename_last") & "</TD>" & _
" <TD>" & objRecordset
("ename_first") & "</TD>" & _
" <TD>" & objRecordset
("phone") & "</TD>" & _
" <TD>" & objRecordset
("location") & "</TD>" & _
" <TD>" & objRecordset
("title") & "</TD>" & _
" <TD>" & objRecordset
("expertise") & "</TD>" & _
" <TD>" & objRecordset
("job_description") & "</TD>" & _
" <TD><A
Href=javascript:deleteEmployee(" & _
varEmpno & ");>Delete</A></td>" & _
"</TR>"
objRecordset.Movenext
Loop
Response.Write "</TABLE>"
set objRecorset = nothing
%>
<Script>
function deleteEmployee(empno) {
if (window.confirm("Are you sure you want to delete this
employee?") == true)
{
window.location = "DeleteEmp.asp?empno=" + empno;
}
}
Message #2 by Steve Carter <Steve.Carter@t...> on Thu, 19 Jul 2001 10:44:14 +0100
|
|
ORDER BY desc
should be
ORDR BY <fieldname> DESC
> -----Original Message-----
> From: fione0212@h... [mailto:fione0212@h...]
> Sent: 19 July 2001 02:09
> To: ASP Databases
> Subject: [asp_databases] ORA-00936 missing expression
>
>
> hi
>
> I'm not sure why I always get this message when I try to test
> out my page.
>
> here is the message:
>
>
> Microsoft OLE DB Provider for Oracle error '80040e14'
>
> ORA-00936: missing expression
>
> /orgchart1/default.asp, line 27
>
>
> and here is the code:
>
> Dim objRecordset
> Dim varSQL
> Dim varEmpno
>
> varSQL =3D "SELECT crw_employees.empno, crw_employees.ename_last, " &
_
> " crw_employees.ename_first,
> crw_employees.phone, " & _
> " crw_employees.location,
> crw_employees.title, " & _
> " crw_employees.expertise,
> crw_employees.job_description, " & _
> " FROM crw_employees " & _
> " ORDER BY desc "
>
|
|
 |