Skip to main content
Inspiring
April 6, 2012
Question

can't I call a function this way?

  • April 6, 2012
  • 1 reply
  • 1598 views

I tried to get records from a table from server A (Sybase) and insert the records to server B (Oracle) using CF8

Both has the same exact table and datatype

When I do the following, I got this error and not sure where I did wrong

Missing argument name.

When using named parameters to a function, every parameter must have a name.

The CFML compiler was processing:

My codes:

--------------

<cfquery name="getSybaseRec" datasource="DSN1">

  SELECT * FROM tbl_EP

</cfquery>

<CFLOOP query="getSybaserec">

    <CFSET ToOra ('#Column_1#', '#Column_2#', '#CreateODBCDate(DateColumn)#'>

</CFLOOP>

<CFFUNCTION name = "ToOra">

  <cfargument name="col1" type="String" required="True">

  <cfargument name="col2" type="String" required="True">

  <cfargument name="date_col" type="date" required="True">

  INSERT INTO tblEP_Ora (Column_1, Column_2, DateColumn)

   VALUES ('#arguments.col1#', '#arguments.col2#', #arguments.date_col#>

</CFFUNCTION>

This topic has been closed for replies.

1 reply

Inspiring
April 6, 2012

Unless it is a copy paste error, you are missing close parenthesis ")" in the cfset and INSERT (as well as cfquery tags).