For what it's worth, I'm running into the same problem porting my CF5
applications to CF8. When the query begins with "INSERT" (rather than
"SELECT"), the query object doesn't seem to get created.

I've temporarily worked around this by using "SET NOCOUNT ON" prior to
the INSERT call, but am still looking for a real fix.

Also, cumulative hot fix 2 was released yesterday. Not sure if it'll
help though:

    http://kb.adobe.com/selfservice/viewContent.do?externalId=kb402792&sliceId=1

On Nov 12, 9:35 pm, "Scott Thornton"
<[EMAIL PROTECTED]> wrote:
> heya,
>
> thats right, the code worked in 6, then fell over on 8 running locally.
>
> I didn't try another alias.
>
> yes, there was a transaction wrapping a few queries.... I had placed a 
> CFABORT past the point of failure (but  before the closing cftransaction tag).
>
> the query was falling over for no apparent reason in relation to the new_id 
> not being in existence, the code when run back on version 6 ran as I would 
> expect, the ID existed all the way up until the cfabort that caused the 
> transaction to fail.
>
> my line of thinking is that database queries and debugging is handled 
> somewhat differently to 6 in 8. the cfabort causing the debug to get out of 
> synch with the transaction or something.
>
> hopefully I will have some time soon to get back to testing this theory...
>
> >>> "Barry Beattie" <[EMAIL PROTECTED]> 13/11/2007 12:33 pm >>>
>
> Still no joy, Scott?
>
> the code works on CF6.1 but falls over on CF8, right?
>
> and "new_id" is def not a new reserved word entering the volcabulary
> (ie: you've tried another alias)?
>
> is there a cftransaction wrapping that query (or further upstream in the 
> call)?
>
> On 11/13/07, Scott Thornton <[EMAIL PROTECTED]> wrote:
>
>
>
> > quote: If you dump out the insert query, you will see that the newly 
> > created ID is there waiting for you, if you want to change your code around 
> > ;)
>
> > I remember hearing that now. thats just on cf 8 right?
>
> > the code must be backward compatible with cfmx 6.1 still though.
>
> > the example I had works elsewhere, just not on the page when I was 
> > debugging something else...
>
> > >>> "Mark Mandel" <[EMAIL PROTECTED]> 12/11/2007 4:50 pm >>>
>
> > Barry -
>
> > It's done through the JDBC driver, so it's probably right down into the DB 
> > core.
>
> > Mark
>
> > On Nov 12, 2007 4:35 PM, Barry Beattie <[EMAIL PROTECTED]> wrote:
>
> > > @Mark: is that SCOPE_IDENTITY or @@IDENTITY that the id is gotten from?
>
> > > @Scott: what happens if you change "new_id" to some other alias? (or
> > > additionally put new_id in square brackets)
>
> > > select scope_identity() as [new_id]
>
> > > On Nov 12, 2007 3:31 PM, Mark Mandel <[EMAIL PROTECTED]> wrote:
>
> > > > If you dump out the insert query, you will see that the newly created
> > > > ID is there waiting for you, if you want to change your code around ;)
>
> > > > Mark
>
> > > > On Nov 12, 2007 2:41 PM, Scott Thornton
> > > > <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi,
>
> > > > > Running version 8,0,0,176276 on local against a MS SQL 2005 database.
>
> > > > > I ran into a problem late last week where a query returning the id 
> > > > > after an insert eg:
>
> > > > > <cfquery ......>
> > > > > insert ........
> > > > > select scope_identity() as new_id
> > > > > </cfquery>
>
> > > > > the compiler would return the error queryname.new_id is undefined.
>
> > > > > The exact same code worked when executed against a cfmx6.1 against 
> > > > > the same database with nothing changed.
>
> > > > > The application has this usage throughout it and those other bits of 
> > > > > code are fine.
>
> > > > > Soo,
>
> > > > > I was wondering has anyone ran into this intermittent problem before?
>
> > > > > I notice there is a Hot Fix 
> > > > > availablehttp://kb.adobe.com/selfservice/viewContent.do?externalId=kb402466&sl...for
> > > > >  CF 8...... but the issues list does not seem to reference any 
> > > > > database issues...
>
> > > > > Is there a JDBC driver update available for it as well that I cannot 
> > > > > find?
>
> > > > > Also, how do I find out what version of jdbc I have?
>
> > > > > Cheers,
>
> > > > --
> > > > E: [EMAIL PROTECTED]
> > > > W:www.compoundtheory.com
>
> > --
> > E: [EMAIL PROTECTED]
> > W:www.compoundtheory.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" 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/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to