createData() only adds an objectid if there isn't one set in the properties
struct - you can add one yourself (i.e. newobj.objectid = createuuid() ) and
use that in later processing.

Blair

On Jan 18, 2008 4:46 AM, tilespace <[EMAIL PROTECTED]> wrote:

>
> No one's ever come across this before? I'm a pioneer!!!
>
> On Jan 15, 11:09am, tilespace <[EMAIL PROTECTED]> wrote:
> > Howdy :)
> > So I'm building an import script that takes all of the data from the
> > existing database and imports it into the FC database. I've got it
> > importing all of the content properly (the biggest challenge with this
> > was taking data from 4 seperate tables and importing them into a
> > single table) as well as importing all of the relevant images/graphics/
> > photos/logos of the existing site into the dmImage table (I was
> > extremely surprised by my being able to do this lol).
> >
> > Here's my issue tho. I have 7 FC tables (custom types) that have
> > either both a logo and photo field or just a photo field. The images
> > are in the dmImage table. But I can't for the life of me figure out
> > how to get the objectid for the newly created image and pass it back
> > to the addRecord() function so that it is inserted into the correct
> > record.
> >
> > Here's my process:
> >
> > addRecord() is called and takes 3 parameters - typeName, origTblName,
> > and arrFlds. The array has 2 values - the new field name and the
> > original field name that it is associated to (ie: name:casino,
> > addr1:address, website:url, logo:logoimagepath, etc).
> >
> > It then runs a select query on the origTblName which is then looped
> > through. I use cfscript to then assign the appropriate values before
> > calling newRec.createData(). If there is a logo or photo field, and
> > it's not empty, I call the function FCifyImg() which takes 2
> > parameters - origImg and origImgName. It pretty much does the exact
> > same thing as addRecord() but for dmImage. But here I need to be able
> > to return the new objectid to addRecord() and am just drawing a blank
> > cuz if I run a scope_identity() query, it runs first before
> > FCifyImg()... I've tried other methods that are erroring out so I'm at
> > a loss...
> >
> > Here's an example of calling the image function:
> >
> > stRecords.photo = FCifyImg(oldRec.image,oldRec.name);
> >
> > I hope that makes sense...
> >
> > Thanks...
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to