Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Access Queries _ Update Column Name With Special Characters

Posted by: pacala_ba Oct 30 2019, 09:26 AM

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

Posted by: DanielPineault Oct 30 2019, 09:32 AM

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.

Posted by: isladogs Oct 30 2019, 10:51 AM

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

Posted by: pacala_ba Oct 31 2019, 03:39 AM

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

Posted by: projecttoday Oct 31 2019, 05:27 AM

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

What happens if you do this

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

?

Posted by: Phil_cattivocarattere Oct 31 2019, 05:57 AM

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 ¾)

Posted by: pacala_ba Nov 8 2019, 09:52 AM

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


Posted by: isladogs Nov 8 2019, 01:29 PM

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?

Posted by: DanielPineault Nov 8 2019, 02:06 PM

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!

Posted by: pacala_ba Nov 9 2019, 11:42 AM

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...

Posted by: isladogs Nov 9 2019, 12:21 PM

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 http://www.mendipdatasystems.co.UK/available-connections/4594418530, 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.

Posted by: pacala_ba Nov 15 2019, 03:41 AM

Hi

QUOTE
Are you saying there is a tool available in A2016 for checking system resources that A2010 doesn't have?

does not exists
and there is NO/NONE TOOL, for checking FREE System resources... iconfused.gif

Only indirectly, i can build VERY-LARGE-STRING-ARRAYS ....up to waiting for Error: System Resources Exceeded iconfused.gif

Posted by: isladogs Nov 15 2019, 04:55 AM

Sorry but I don't understand your reply. Probably a language issue.

Did you look at my utility - link in previous reply?
If not, see if it helps identify issues to prioritise where the design can be improved

Have you tried increasing the MaxLocksPerFile settings?

Posted by: Jeff B. Nov 15 2019, 09:34 AM

Why are you renaming the column? That is, what will having a new column name then allow you/Access to do?

(I ask because there may be more than one way to accomplish what you wish to do, but we'd need to know what that is)