[AccessD] Access 2007 - QUick Survery - BUGS

Long, Karen S. (CDC/NIOSH/NPPTL) (CTR) cyx5 at cdc.gov
Wed May 10 05:33:07 CDT 2006


Not in SQL2005 and .net.  Need to enclose them in brackets. 


Karen S. Long
Programmer Analyst
EG&G Technical Services, Inc.
Pittsburgh, PA
Phone: 412-386-6649
Email: cyx5 at cdc.gov


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby
Sent: Tuesday, May 09, 2006 8:25 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Access 2007 - QUick Survery - BUGS

It is a STRING passed in as a table/query name!!! Dashes are quite valid
in table names.


John W. Colby
www.ColbyConsulting.com 


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte
Foust
Sent: Tuesday, May 09, 2006 7:35 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Access 2007 - QUick Survery - BUGS

Now, John, you know by now that dashes require square brackets around
the object name to distinguish them from mathmatical operations! 


Charlotte Foust

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby
Sent: Tuesday, May 09, 2006 4:24 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Access 2007 - QUick Survery - BUGS

Well, I found two "features" today.

Working with an ADO recordset to do a "pushbutton" comma delimited file
code ("csv" file), I passed in a query name with a dash in it.  The code
apparently truncated the query name at the dash and actually selected a
query that happened to be named the remainder of the name.  IOW

I had a query called ABCD
I had another query called ABCD-XYZ

In the rst.Open I passed in ABCD-XYZ.  ADO truncated the name to ABCD
and opened the ABCD query.  QUITE CONFUSING!!!  It took me a long time
to figure out what was happening.

In another case I had a query with a long name.  Apparently ADO has some
internal limit which treats any string passed in to the rst.open as a
query / table name if shorter than X characters but as a SQL statement
if longer than X characters.  Thus (once I took out the dash) I started
getting "not a valid SQL statement, should contain SELECT etc." error
messages from my long named query.  As soon as I shortened up the query
name (removing the dash of course), everything worked just fine.

I spent the better part of the day on THAT pair of "features".


John W. Colby
www.ColbyConsulting.com 



--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list