Hello,

I am running CF 8 on an Oracle database. I'm trying to pass in a SQL script as 
a string and keep getting the error: ORA-00907: missing right parenthesis.

This is what I'm trying to do:
<cfset sendMethod = createObject("component","components.sendMethods")>
<cfset sendMethod.init(dsn = request.selecteddns)>
<cfset sql="INSERT INTO nkonye_associated_person " />
<cfset sql = sql & chr(10) & chr(13) & 
"(ADDED_DATE,ASSOCIATED_PERSON_ID,IS_REMOVED,PATIENT_ID,PROFILE_ID,ADDRESS_LINE1,ADDRESS_LINE2,ADDRESS_LINE3,ADDRESS_LINE4,ADDRESS_LINE5,ASSOCIATED_RELATIONSHIP_ID,ASSOCIATED_RELATIONSHIP_OTHER,DAYS_ATTENDED,EMAIL,FIRST_LANGUAGE_ID,FORENAME,FREQUENCY_OF_CARE,INTERPRETER_REQUIRED_ID,IS_KEYHOLDER,MODIFIED_DATE,ORGANISATION_NAME,OTHER_COMMUNICATION_ISSUE,POSTCODE,PREFERRED_LANGUAGE_ID,PREFERRED_METHOD_ID,SURNAME)"
 />
<cfset sql = sql & chr(10) & chr(13) & "VALUES  (to_date('2009-10-07 
13:07:28','yyyy-mm-dd hh24:mi:ss'),8,0,17,142,'122 Cleland 
hospital',null,null,null,null,1014,null,null,null,null,'Borlotti',null,null,null,null,null,null,null,null,null,'Bean')"
 />

<cfset sendMethod.doRunScript(#sql#) />

The doRunScript method is as follows:
<cffunction name="doRunScript" access="public" >
   <cfargument name="sql" type="string" required="yes">
          
   <cfquery datasource="#request.selecteddns#">
       #sql#
   </cfquery>
      
</cffunction>

Is there a workaround for this?

Thanks,

Nikki 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339070
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to