Charlotte Foust
cfoust at infostatsystems.com
Tue Nov 28 15:37:21 CST 2006
ADO generally uses SQL Server syntax (i.e., no ; at the end and single
quotes around dates) rather than the Access SQL that DAO handles.
Charlotte Foust
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Beach Access
Software
Sent: Tuesday, November 28, 2006 12:59 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] ADO Problem
Seems to confirm that single quotes are needed to delimit the dates.
Thanks Martin.
Rocky
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Martin Reid
Sent: Tuesday, November 28, 2006 11:46 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] ADO Problem
Rocky
have a look at this
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=741812&SiteID=1
Martin
Martin WP Reid
Training and Assessment Unit
Riddle Hall
Belfast
tel: 02890 974477
________________________________
From: accessd-bounces at databaseadvisors.com on behalf of Beach Access
Software
Sent: Tue 28/11/2006 19:36
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] ADO Problem
Using:
"SELECT #" & dtToday & "#"
He gets an error message:
Invalid column name '#11'
dtToaday does contain 11/28/2006
What else could it be?
MTIA
Rocky
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of McGillivray,
Don [IT]
Sent: Tuesday, November 28, 2006 10:39 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] ADO Problem
Hi, Rocky.
Just a WAG (I don't know ADO), but how 'bout:
Conn.Execute "INSERT INTO tWeeklyUpdateSent ( DateSent ) " & _
"SELECT #" & dtToday & "#;"
Don
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Beach Access
Software
Sent: Tuesday, November 28, 2006 10:15 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] ADO Problem
Dear List:
A colleague (who thinks I know ADO) writes in to ask why the following:
Conn.Execute "INSERT INTO tWeeklyUpdateSent ( DateSent ) " & _
"SELECT " & dtToday & ""
Inserts a record into tWeeklyUpdateSent so the conection is OK. But but
the date is 1/1/1900 instead of today's date.
I had him check the contents of dtToday and it does indeed have
11/28/2006 in it.
Does anyone see what he's doing wrong here?
MTIA
Rocky
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
<http://www.databaseadvisors.com/>
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
<http://www.databaseadvisors.com/>
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.14.19/555 - Release Date:
11/27/2006
6:09 PM
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
<http://www.databaseadvisors.com/>
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.14.19/555 - Release Date:
11/27/2006
6:09 PM
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com