Skip to main content
Participant
August 30, 2009
Answered

unable to do query fror oracle 9i

  • August 30, 2009
  • 1 reply
  • 998 views

Dear Members

I am new to CF. just i installed CF8 and Oracle 9i. i added datasource for oracle and its fine but unable to do query for below cfm file. error is as below. your help is highly appreciated

Regards

Error Executing Database Query.

[Macromedia][Oracle JDBC Driver][Oracle]ORA-00911: invalid character

<cfquery name="getMember" datasource="myoracle">

select empno, ename, job, sal, deptno from emp;

</cfquery>

<html>
<head>
<title>Testing of Oracle database through Coldfusion</title>
</head>
<body>

<table border=1>
<tr>
<th>Employee No.</th><th>Employee Name</th><th>Job</th><th>Salary</th><th>Dept. No.</th>
</tr>


<cfoutput query="getMember">

<tr>
<td>#empno#</td>
<td>#ename#</td>
<td>#job#</td>
<td>#sal#</td>
<td>#deptno#</td>
</tr>
</cfoutput>

</table>

</body>
</html>

This topic has been closed for replies.
Correct answer Adam Cameron.

Get rid of the semi-colon.  The semi-colon is an Oracle client statement separator, and is not actually part of the SQL itself.  It's not needed - and indeed as you have found out invalid in JDBC calls.

--

Adam

1 reply

Adam Cameron.Correct answer
Inspiring
August 30, 2009

Get rid of the semi-colon.  The semi-colon is an Oracle client statement separator, and is not actually part of the SQL itself.  It's not needed - and indeed as you have found out invalid in JDBC calls.

--

Adam

nemdargAuthor
Participant
August 31, 2009

Thanks a lot Adam

Regards

MSN