>- see footer for list info -<
select @@Identifier as maxid from table 

in the SAME <CFquery> you used to insert the record




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Snake
Sent: 22 November 2006 04:53 PM
To: 'Coldfusion Development'
Subject: [CF-Dev] uniqueIdentifier datatype


>- see footer for list info -<
I am trying to use the UniqueIdentifier data type in SQL Server 200 to
generate a UUID for each record.
But I can't seem to insert it.

Using
<cfqueryparam cfsqltype="cf_sql_idstamp" value="#ticketID#">

Where ticket ID = CreateUUID()
Results in

 [Macromedia][SQLServer JDBC Driver][SQLServer]Syntax error converting from
a character string to uniqueidentifier.

I would use the SQL built in function NEWID() to do it on the database, but
then I can't easily select the last inserted record to get my new ID.

--
Russ


_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to