What happens if the same session inserts two records?  Any idea on how to
use the DateCreated field in the where clause?    When form.DateCreated is
written to an Access database it comes back without the prefix of {ts ' and
suffix of '}.  If I strip the form.DateCreated to look like the returned
DateCreated my routine errors in the where clause.

 -----Original Message-----
From:   Gena [mailto:[EMAIL PROTECTED]]
Sent:   Monday, October 30, 2000 8:52 PM
To:     CF-Server
Subject:        Re: Record ID

Can I advise?

Some minor changes:

<cfquery name="insertRecord" datasource="#mydsn#">
insert into table(name,UserInsertedID)
values('#form.name#', #session.UserID#)
</cfquery>

<cfquery name="getMax" datasource="#mydsn#">
        select  tableID
        from table
        where name = '#form.name#'
             and UserInsertedID = #session.UserID#
        Order by tableID
</cfquery>

 <cfset tableID = getMax.TableID[1]>

This should work in multiuser environment.

Cheers,
Gennadi

----------------------------------------------------------------------------
--
To unsubscribe, send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with 
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

Reply via email to