If you standardize a dateformat on what you insert into a date time field in
the database you can use ###form.date### to find the exact match in your SQL
statement. when inserting the date you are querying on use the
#dateformat(#variable#,"mm/dd/yyyy") or some derivative of this to know
exact input for later queries.
But to make sure you get the exact number no matter how many users there are
involved and if you know the value of the record. query the database on
every form field you know
such as
SELECT id
FROM table
WHERE date = ###form.date### and title= #form.title# and userid =
#form.userid# and so on you might have to play wih single or double quotes
to get the exact data
----- Original Message -----
From: "Dan" <[EMAIL PROTECTED]>
To: "CF-Server" <[EMAIL PROTECTED]>
Sent: Monday, October 30, 2000 7:58 PM
Subject: RE: Record ID
> 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
>
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body or visit the list page at www.houseoffusion.com