Hi there Paul
 
I had a look at it, and I was using it by dynamically creating the stProperties structure with the fields from source db tables and calling the relevant type as follows
 
<cfinvoke
   component="farcry.farcry_fincas.packages.types.sc#t#"
   method="createData"
   returnvariable="createDataRet">
   <cfinvokeargument name="stProperties" value="#stProps#"/>
   <cfinvokeargument name="user" value="mdrew"/>
   <cfinvokeargument name="auditNote" value="Created by Import Script from farcry_fincas"/>
  </cfinvoke>
 
The actual problem I found out was that in /farcry/fourq/_fourq/createData.cfm, In the insert statement the following fields were commented out which meant that the insert query method failed when I was calling it
 
The datetimecreated, createdby,datetimelastupdated and lastupdatedby fields are required by the DB
 
 
INSERT INTO #tablename#
(
ObjectID,
#PreserveSingleQuotes(sqlcol)#
<!--- datetimecreated,
createdby,
datetimelastupdated,
lastupdatedby
 --->)
VALUES
(
'#objectid#',
#PreserveSingleQuotes(sqlval)#
<!--- #createodbcdatetime(Now())#,
'#getAuthUser()#',
#createodbcdatetime(Now())#,
'#getAuthUser()#'
 --->)
 
 
Currently I am trying to insert the label dynamically but it seems not to like that! Will have to have a better look
 
Regards
 
Mark Drew
 
----- Original Message -----
Sent: Wednesday, October 22, 2003 2:42 PM
Subject: [farcry-dev] Re: Dynamic Import

Hey Mark - createdata is the way of doing this - can you send through a snippet of your create code including the stProperties struct you are passing in and perhaps we can see where you are going wrong :)
 
Paul
 

>>> [EMAIL PROTECTED] 22/10/2003 5:25:05 pm >>>
Hello all!
 
I quick question, I am creating a custom admin module that imports data from another Database.
 
What it currently does is look at a DB, create a type for each table that you have selected and creates CFCs for each of the table (thus a new type).
 
The next step of the process is to look at all the tables in the DB to be imported and imports the rows using the inherited "createData" method of the CFC.
 
Even though it is telling me that an instance has been created, no data is actually imported. No row is created. Is there a common way of doing this?
 
Regards
 
Mark Drew
 
---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to