UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Update Column Name With Special Characters, Any Version    
 
   
pacala_ba
post Oct 30 2019, 09:26 AM
Post#1



Posts: 665
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


Hi
I want to update table with
CODE
UPDATE TABLE SET COLUMN_NAME + chr(190) = 'AAA';

Query direkt editing.....copy/paste name and Run Query.............OK

Create Query programmatically.....
ľ............chr(190), character required

¾ .........wrong character, if executing query iconfused.gif

--------------------
Go to the top of the page
 
DanielPineault
post Oct 30 2019, 09:32 AM
Post#2


UtterAccess VIP
Posts: 6,961
Joined: 30-June 11



I think you're going to have to explain things a little more for us to be able to understand the issue and be able to offer any advice.

--------------------
Daniel Pineault (2010-2019 Microsoft MVP, UA VIP, EE Distinguished Expert 2018)
Professional Help: https://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: https://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
isladogs
post Oct 30 2019, 10:51 AM
Post#3


UtterAccess VIP
Posts: 1,795
Joined: 4-June 18
From: Somerset, UK


If you are suggesting using special characters in field names (table or query), it is a bad idea.
Use alphanumeric characters & if you must, underscores, only

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 
pacala_ba
post Oct 31 2019, 03:39 AM
Post#4



Posts: 665
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


Hi, i am sorry...
Table with ColumnName = 'COLUMN_NAMEľ'
..the last special character is chr(190)

Query direkt editing.....copy/paste name and Run Query.............OK
CODE
UPDATE TABLE SET COLUMN_NAMEľ'  = 'AAA';


Problem:
but, the same does not work programmatically..
CODE
UPDATE TABLE SET COLUMN_NAMEľ'  = 'AAA';
'if running query Error...unknown column name
UPDATE TABLE SET COLUMN_NAME¾'  = 'AAA';

there is some Character Conversion behind the scene...
from
ľ............chr(190), character required
to
¾ .........wrong character, if executing query iconfused.gif

--------------------
Go to the top of the page
 
projecttoday
post Oct 31 2019, 05:27 AM
Post#5


UtterAccess VIP
Posts: 11,188
Joined: 10-February 04
From: South Charleston, WV


More context might help. Can you post the program code?

What happens if you do this

"UPDATE TABLE SET COLUMN_NAME" & chr(190) & " = 'AAA'"

?

--------------------
Robert Crouser
Go to the top of the page
 
Phil_cattivocara...
post Oct 31 2019, 05:57 AM
Post#6



Posts: 368
Joined: 2-April 18



I agree with projecttoday for more context, but I would suggest to put your field name between [ ] (it is a very curious name, both with ľ' or ¾)

--------------------
Please forgive in advance my horrible English.
Go to the top of the page
 
pacala_ba
post Nov 8 2019, 09:52 AM
Post#7



Posts: 665
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


Hi, it was really very difficult... pullhair.gif
CODE
For I = 128 To 65535 ' ChrW=  128–65,535
'I_EXEC = TT_GET_ROWS_COUNT("K_CDB", "LEN(TRIM(NZ([Spracovateľ])))>0")
I_EXEC = 0
I_EXEC = TT_GET_ROWS_COUNT("K_CDB", "LEN(TRIM(NZ([Spracovate" & ChrW(I) & "])))>0", bIgnoreErrors:=True)
If I Mod 1000 = 0 Then Debug.Print I
If I_EXEC > 0 Then Debug.Print I_EXEC, I: Exit For
Next I
Debug.Print "END"

and the MATCHCODE IS = 317 woohoo.gif
CODE
[Spracovate" & ChrW(317) & "]

..the last wide character is UNICODE=317


--------------------
Go to the top of the page
 
isladogs
post Nov 8 2019, 01:29 PM
Post#8


UtterAccess VIP
Posts: 1,795
Joined: 4-June 18
From: Somerset, UK


Glad you have a solution. I'm not going to pretend I understand it!

Just read you signature line and wonder why you say 2010 not recommended.
I have been using that as my default development version for 10 years and in my opinion it is far better than any version before or since both in terms of the features included and the user interface.
So why don't you recommend it?

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 
DanielPineault
post Nov 8 2019, 02:06 PM
Post#9


UtterAccess VIP
Posts: 6,961
Joined: 30-June 11



QUOTE
wonder why you say 2010 not recommended.

I hadn't notice, but fully agree.

My favorite versions remain 2003 (all time best!) and 2013 (closely followed by 2010, but there was an issue with format change incompatibility between SP1 and SP2 if memory serves me).
I'd stay away from 2007 and any 2016+/O365 as they are simply packed with bugs!

--------------------
Daniel Pineault (2010-2019 Microsoft MVP, UA VIP, EE Distinguished Expert 2018)
Professional Help: https://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: https://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
pacala_ba
post Nov 9 2019, 11:42 AM
Post#10



Posts: 665
Joined: 19-March 09
From: Europe, SLOVAKIA, Bratislava


Hi,
QUOTE
wonder why you say 2010 not recommended.

because of daily Errors...System resources exceeded pullhair.gif
On msdn forum, i have posted an Test Database, ...only after many SQL.Table updates....there appears allways : System resources exceeded
(This Test Database in AC 2016.....OK)

Without any code changes, In WIN=10.AC 2016....no more such problems.
Only sometimes,(about 1-2 times in a week) appears something like...database size is over Limit 2GB shocked.gif
and the database size is 100% .......not over Limit.

and there is NO TOOL, for checking FREE System resources... iconfused.gif
May be in my code is missing somewhere Memory cleanup...., but there is also , my opionion, AC2010 Memory Problem, or WIN 7 ?
I am using very often ARRAYS...

--------------------
Go to the top of the page
 
isladogs
post Nov 9 2019, 12:21 PM
Post#11


UtterAccess VIP
Posts: 1,795
Joined: 4-June 18
From: Somerset, UK


I have only rarely experienced system resource issues in 10 years of regularly working with A2010.
As each version of Access is less tolerant of code errors than those before it, I would expect A2016 to have the same issues as A2010.
Resource errors can be managed in various ways e.g. by checking AvailableConnections, increasing the number of MaxLocksPerFile etc.

By contrast to your experience, I have found A2016/365 to have more bugs and be far more likely to crash.

Are you saying there is a tool available in A2016 for checking system resources that A2010 doesn't have?
If so, please enlighten me what it is.

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    14th November 2019 - 07:46 PM