Date fields in SQL

2000-10-01 Thread W Luke

Hi,

Well it's another Query problem for Will today - the error message is
telling me it can't find expiry_date field - in Access I've set the
date/time format to a custom dd-mmm-yy - is this the problem?  Here's the
code:




 SELECT id FROM advert_details
 WHERE expiry_date = #today#


ODBC Error Code = 07001 (Wrong number of parameters)


[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.



Any ideas?

Thanks, again all.



Will


--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Date fields in SQL

2000-10-01 Thread James Smith

Shouldn't you use  and also I
think ID is a reserved word in access, try using AdvertID instead (or
something similar).

--
James Smith
[EMAIL PROTECTED]

- Original Message -
From: "W Luke" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, October 01, 2000 2:24 PM
Subject: Date fields in SQL


> Hi,
>
> Well it's another Query problem for Will today - the error message is
> telling me it can't find expiry_date field - in Access I've set the
> date/time format to a custom dd-mmm-yy - is this the problem?  Here's the
> code:
>
> 
>
> 
>  SELECT id FROM advert_details
>  WHERE expiry_date = #today#
> 
>
> ODBC Error Code = 07001 (Wrong number of parameters)
>
>
> [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
>
>
>
> Any ideas?
>
> Thanks, again all.
>
>
>
> Will
>
>
> --

> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Date fields in SQL

2000-10-01 Thread W Luke

I used to #createodbcdate# function as shown below which has worked great.

WHERE expiry_date = #createodbcdate(DateFormat(now(), "DD-MMM-YY"))#

Cheers

Will

- Original Message -
From: "James Smith" <[EMAIL PROTECTED]>
Newsgroups: cf-talk
Sent: Sunday, October 01, 2000 2:28 PM
Subject: Re: Date fields in SQL


> Shouldn't you use  and also
I
> think ID is a reserved word in access, try using AdvertID instead (or
> something similar).
>
> --
> James Smith
> [EMAIL PROTECTED]
>
> - Original Message -
> From: "W Luke" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Sunday, October 01, 2000 2:24 PM
> Subject: Date fields in SQL
>
>
> > Hi,
> >
> > Well it's another Query problem for Will today - the error message is
> > telling me it can't find expiry_date field - in Access I've set the
> > date/time format to a custom dd-mmm-yy - is this the problem?  Here's
the
> > code:
> >
> > 
> >
> > 
> >  SELECT id FROM advert_details
> >  WHERE expiry_date = #today#
> > 
> >
> > ODBC Error Code = 07001 (Wrong number of parameters)
> >
> >
> > [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
1.
> >
> >
> >
> > Any ideas?
> >
> > Thanks, again all.
> >
> >
> >
> > Will
> >
> >
>
> --
> 
> > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
>
> --

> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Date fields in SQL

2000-10-01 Thread Bud

On 10/1/00, W Luke penned:
>Hi,
>
>Well it's another Query problem for Will today - the error message is
>telling me it can't find expiry_date field - in Access I've set the
>date/time format to a custom dd-mmm-yy - is this the problem?  Here's the
>code:

For some reason, every now and again I have problems if I name 
something underscore date. Try naming expirydate and see if that 
helps.

And it wouldn't hurt to refer to today as #createodbcdate(today)#. 
But that's probably not the problem.
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Date fields in SQL

2000-10-01 Thread paul smith

ANYTHING_date as a form name triggers a CF something or another.
Change the name.  Only took me a week to find it the first time ;-)

best,  paul

At 11:13 AM 10/1/00 -0400, you wrote:
> >telling me it can't find expiry_date field - in Access I've set the
> >date/time format to a custom dd-mmm-yy - is this the problem?  Here's the
> >code:
>
>For some reason, every now and again I have problems if I name
>something underscore date. Try naming expirydate and see if that
>helps.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Date fields in SQL

2000-10-01 Thread Bud

On 10/1/00, paul smith penned:
>ANYTHING_date as a form name triggers a CF something or another.
>Change the name.  Only took me a week to find it the first time ;-)

Took me a year to figure it out. LOL I used that forever, then one 
day I hit one application that was giving me fits. Round and round I 
went until I tried renaming the date field. Since then I don't use 
underscores in date fields.
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Date fields in SQL

2000-10-02 Thread James Smith

you could probably drop it to

WHERE expiry_date = #CreateODBCDateTime(now())#

if you wanted.

> I used to #createodbcdate# function as shown below which has worked great.
>
> WHERE expiry_date = #createodbcdate(DateFormat(now(), "DD-MMM-YY"))#
>
> Cheers
>
> Will
>
> - Original Message -
> From: "James Smith" <[EMAIL PROTECTED]>
> Newsgroups: cf-talk
> Sent: Sunday, October 01, 2000 2:28 PM
> Subject: Re: Date fields in SQL
>
>
> > Shouldn't you use  and
also
> I
> > think ID is a reserved word in access, try using AdvertID instead (or
> > something similar).
> >
> > --
> > James Smith
> > [EMAIL PROTECTED]
> >
> > - Original Message -
> > From: "W Luke" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Sunday, October 01, 2000 2:24 PM
> > Subject: Date fields in SQL
> >
> >
> > > Hi,
> > >
> > > Well it's another Query problem for Will today - the error message is
> > > telling me it can't find expiry_date field - in Access I've set the
> > > date/time format to a custom dd-mmm-yy - is this the problem?  Here's
> the
> > > code:
> > >
> > > 
> > >
> > > 
> > >  SELECT id FROM advert_details
> > >  WHERE expiry_date = #today#
> > > 
> > >
> > > ODBC Error Code = 07001 (Wrong number of parameters)
> > >
> > >
> > > [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
> 1.
> > >
> > >
> > >
> > > Any ideas?
> > >
> > > Thanks, again all.
> > >
> > >
> > >
> > > Will
> > >
> > >
> >
>
> --
> > 
> > > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > > To Unsubscribe visit
> > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or
> > send a message to [EMAIL PROTECTED] with 'unsubscribe'
in
> > the body.
> >
>
> --
> 
> > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
>
> --

> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Date fields in SQL

2000-10-02 Thread Steve Martin

Or even WHERE expiry_date = #now()#
as Now() returns an ODBC compliant date/time stamp.


> -Original Message-
> From: James Smith [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, October 01, 2000 14:49
> To: CF-Talk
> Subject: Re: Date fields in SQL
>
>
> you could probably drop it to
>
> WHERE expiry_date = #CreateODBCDateTime(now())#
>
> if you wanted.
>
> > I used to #createodbcdate# function as shown below which has
> worked great.
> >
> > WHERE expiry_date = #createodbcdate(DateFormat(now(), "DD-MMM-YY"))#
> >
> > Cheers
> >
> > Will
> >
> > - Original Message -
> > From: "James Smith" <[EMAIL PROTECTED]>
> > Newsgroups: cf-talk
> > Sent: Sunday, October 01, 2000 2:28 PM
> > Subject: Re: Date fields in SQL
> >
> >
> > > Shouldn't you use  and
> also
> > I
> > > think ID is a reserved word in access, try using AdvertID instead (or
> > > something similar).
> > >
> > > --
> > > James Smith
> > > [EMAIL PROTECTED]
> > >
> > > - Original Message -
> > > From: "W Luke" <[EMAIL PROTECTED]>
> > > To: "CF-Talk" <[EMAIL PROTECTED]>
> > > Sent: Sunday, October 01, 2000 2:24 PM
> > > Subject: Date fields in SQL
> > >
> > >
> > > > Hi,
> > > >
> > > > Well it's another Query problem for Will today - the error
> message is
> > > > telling me it can't find expiry_date field - in Access I've set the
> > > > date/time format to a custom dd-mmm-yy - is this the
> problem?  Here's
> > the
> > > > code:
> > > >
> > > > 
> > > >
> > > > 
> > > >  SELECT id FROM advert_details
> > > >  WHERE expiry_date = #today#
> > > > 
> > > >
> > > > ODBC Error Code = 07001 (Wrong number of parameters)
> > > >
> > > >
> > > > [Microsoft][ODBC Microsoft Access Driver] Too few
> parameters. Expected
> > 1.
> > > >
> > > >
> > > >
> > > > Any ideas?
> > > >
> > > > Thanks, again all.
> > > >
> > > >
> > > >
> > > > Will
> > > >
> > > >
> > >
> >
> >
> --
> > > 
> > > > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > > > To Unsubscribe visit
> > >
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or
> > send a message to [EMAIL PROTECTED] with 'unsubscribe'
in
> > the body.
> >
>
> --
> 
> > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
>
> --

> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.


--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.