473,499 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Blanks in ColumnNames causes ODBC-Error

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
2 1847
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1274
by: Jon Glazer | last post by:
I know this is sorta reposting but I want to simplify the issue a bit. Take the following script: function replacemain(s){ var x = document.images; var y = document.images; var pictemp =...
6
6079
by: jalkadir | last post by:
I am trying to find a way to remove the leading and tailing blanks from a string. What I have come up with is not doing the work as I expected; because if the value I pass to the function is "...
4
5635
by: Andreas Lauffer | last post by:
Can anyone tell me advantages / disadvantages of DataDirect Server Wire ODBC-driver? Any experiences? What about redistribution? Andreas Lauffer, easySoft. GmbH, Germany
2
1644
by: William Kossack | last post by:
I have an Access table with one primary key and am attempting to update a non-key field, using UPDATE tblMethtest SET fev1timemeth = '' WHERE SID = '0041R'; When I do this, the field...
2
2718
by: John Hoge | last post by:
I have a regex "^\d{5}$" that does not allow blanks, but the RegularExpressionValidator does not fire for empty fields. Is there a way to make it do so? I would rather not include a separate...
34
4055
by: Registered User | last post by:
Hi experts, I'm trying to write a program that replaces two or more consecutive blanks in a string by a single blank. Here's what I did: #include <stdio.h> #include <string.h> #define MAX 80
10
2790
by: Diego F. | last post by:
Hi all. I have an application that receives a message from a socket in an array from a certain size. As the array size may be longer that the message received, the end of the array has blank...
1
1324
by: Hans Terlouw | last post by:
Hi, When trying to wrap C code using Pyrex, I encountered a strange problem with a piece of pure Python code. I tried to isolate the problem. The following code causes Pyrex to generate C code...
5
4054
by: downwitch | last post by:
I have the strangest error, and wonder if anyone else has seen it. I'm using ADODB to return a set of SQL Server 2005 records via ODBC. If I open the recordset this way With cmd .CommandType =...
4
1499
by: eBob.com | last post by:
I have a RichTextBox in which I'd like blanks to appear different from nothing. Imagine a file which does not fill up the RTB. You can't tell how many, if any, blanks might follow the last...
0
7169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7385
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4597
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
294
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.