By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,705 Members | 1,845 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,705 IT Pros & Developers. It's quick & easy.

Blanks in ColumnNames causes ODBC-Error

P: n/a
I use Blanks in ColumnNames ( I know that this isnīt very good, but a
lot of code and querys had to be changed if I would remove all blanks
in all columnnames).
When I link this tables with ODBC in my ACC97 - project, some of the
tables causes an ODBC-Error.

Are there possibilities to workaround this error?

Thanks, Andreas Lauffer, easySoft. GmbH, Germany

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You don't quite mention what you are linking to. (or what you are linking
from).

If you are using ms-access, then you are NOT using odbc if you are linking
to a back end table. That is a file share...and NOT ODBC.

However, you can usually put square brackets around the field name when
using JET.

[City Name] for example.

You are correct that most databases like sql-server etc don't support blanks
in the field names. A hard lesson to learn!

selectCityFromTableTest

select City From TableTest

As you can see, spaces are delimiter used to separate each keyword. Thus, it
is query easy to see how this should be avoided. You should not use spaces
for all objects such as reports, forms, modules, and yes..even field
names...
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
ka****@msn.com
http://www.attcanada.net/~kallal.msn
Nov 12 '05 #2

P: n/a
Thanks for your answer.
You don't quite mention what you are linking to. (or what you are linking
from). OK, from Access97 to SQL-Server.
If you are using ms-access, then you are NOT using odbc if you are linking
to a back end table. That is a file share...and NOT ODBC. But the linked table have a ODBC-Connect-String. I use a DSN-less
connection.
However, you can usually put square brackets around the field name when
using JET. I couldīt use brackets, because I just open the linked table in the
speadsheat-view (double-click), and got ODBC-Error, and all fields
contain #Name?


[City Name] for example.

You are correct that most databases like sql-server etc don't support blanks
in the field names. A hard lesson to learn!

selectCityFromTableTest

select City From TableTest

As you can see, spaces are delimiter used to separate each keyword. Thus, it
is query easy to see how this should be avoided. You should not use spaces
for all objects such as reports, forms, modules, and yes..even field
names...


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.