db2set codepage in not working in DB2 windows - db2

I am using DB2 version 9.7 and 10.1 both.When i execute the command to change the code page like "db2set db2codepage=1250" it does not show any error. but aftre that when i import the data then it throws the following error
SQLCODE: -332 - SQLSTATE: 57017
*** SQL0332N Character conversion from the source code page "1252" to the target code page "1250" is not supported. SQLSTATE=57017

if the charset is utf-8 you should use DB2CODEPAGE=1208 on non-windows and 1252 on windows in the system and restart your application.

Related

Why do I got the win32 "123" error code when I'm loging in to the postgreSQL?

Description
I got the win32 123 error code when I'm logining to the postgreSQL.
win32 error code-1
win32 error code-2
I find out the error code represents "The filename, directory name, or volume label syntax is incorrect." so I modified the config file(C:\Program Files\PostgreSQL\14\data\postgresql.conf) and result show below
postgresql.conf
I restart the postgreSQL service(postgresql-x64-14-PostgreSQL Server 14) but the bug still there.
Although this error occurs, I can still log in sucessfuly.
By the way I also tried to reinstall postgreSQL but the result the same.
How can I fix it?
Environment:
OS: windows 10 professional
Database: PostgreSQL v14(x64)
Reference:
1.[win32 error code] https://docs.automic.com/documentation/webhelp/english/ARA/11.2/AE/11.2/All%20Guides/Content/ucaaqc.htm

PostgreSql: 'utf8' codec can't decode byte 0xe9 in position 42: invalid continuation byte

I recently installed PostgreSql and I am trying to create a new database.
Unfortunetly I got and error while creating the database:
"'utf8' codec can't decode byte 0xe9 in position 42: invalid continuation byte"
What is the problem exactly
thank you
Try to add the following line at the end of the pg_hba.conf file and then restart the PostgreSQL service:
host all all all md5
I had a similar error when upgrading from 4.5 to 4.7, the solution was to restart the pgAdmin server.
My error was:
Error: 'utf-8' codec can't decode byte 0xe9 in position 0: invalid continuation byte
It's a conflict between local languages. PgAdmin is in English but maybe in the conf file the lc_messages variable is French, Spanish or something else. Try this
lc_messages = 'en_US'
I tried all the solutions above.
None worked.
The solution for me was to install US ENGLISH as my language on my windows 10.
Then I did the installation all over again in that language.
It's working now, and I do not have use US ENGLISH as my windows language xD

How to use SQLite ODBC Driver with UTF-8 encoding?

I downloaded and installed the SQLite ODBC Driver from http://ch-werner.de/sqliteodbc/.
I had three new ODBC Drivers in my List
SQLite (UTF-8) Driver
SQLite ODBC Driver
SQLite3 ODBC Driver
Using the SQLite3 ODBC Driver works just fine. But not with UTF-8.
The SQLite ODBC (UTF-8) Driver which I assumed to work in this case just gives me the error message
Fehler beim Herstellen der Verbindung zur Datenquelle test
IM002 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Fehler beim Herstellen der Verbindung zur Datenquelle: test
English translation:
Error connecting to data source test
IM002 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Error connecting to data source test
What am I doing wrong?
Christian Werner, the provider of the SQLite Driver helped me via E-Mail.
It turned out that in the settings of the SQLite3 ODBC Driver the OEMCP Translation has to be turned on (By clicking Configure... of the specific User DSN in the ODBC Data Source Administrator)
Now all characters are shown as expected.
In connection string, this translates to OEMCPTranslation parameter:
connStr="DRIVER={{SQLite3 ODBC Driver}};Database=<path>;OEMCPTranslation=1";
Today in my case {...} worked, but not {{..}} when coppying tables from the Access database to the SQLite database using VBA:
DoCmd.TransferDatabase acExport, "ODBC Database", _
"ODBC;DRIVER={SQLite3 ODBC Driver};Database=<path>;OEMCPTranslation=1;", _
acTable, <source table>, <destination table>

Pyodbc utf-8 bind param error With FreeTDS and unixODBC

FreeTDS version 0.82
unixODBC version 2.3.0
pyodbc version 2.1.8
freetds.conf:
tds version = 7.0
client charset = UTF-8
using Servername in the odbc.ini (which for some crazed reason made a difference in getting unixODBC to recognize the client charset in freetds)
I'm able to pull utf8 data correctly and can update with the string inline ie:
UPDATE table
SET col = N'私はトカイ大好き'
WHERE id = 182333369
But
text = u'私はトカイ大好き'
cursor.execute("""
UPDATE table
SET column = ?
WHERE id = 182333369
""", text)
Fails with:
pyodbc.Error: ('HY004', '[HY004] [FreeTDS][SQL Server]
Invalid data type (0) (SQLBindParameter)')
If I add:
text = text.encode('utf-8')
I get the following error:
pyodbc.ProgrammingError: ('42000', '[42000] [FreeTDS][SQL Server]The incoming tabular data stream (TDS) protocol stream is incorrect. The stream ended unexpectedly. (4002) (SQLExecDirectW)')
Any ideas as to where things have gone astray?
Unicode support was reworked in pyodbc 3.0.x. Try testing with the latest source (3.0.2-beta02, etc.)

How to disable Postgresql messages translation

Is there a way to disable the Postgresql translation of messages? I´m running my appl and Postgresql on a pt_BR Windows machine and when a exception is thrown the error message is translated to Portuguese, like:
Caused by: org.postgresql.util.PSQLException: ERRO: relação "unidade_federacao" não existe
Posição: 25
I would like the messages to appear in English.
I´m using the driver postgresql-8.4-701.jdbc3.jar on a Java (with Hibernate) app.
thanks in advance,
Fabrício Lemos
You could change lc_messages in postgresql.conf or just per database:
ALTER DATABASE dbname SET lc_messages=en_us;
See also the manual.
Under Windows, some psql error messages are getting translated corresponding to the format setting in Windows settings -> Clock, Language, and Region -> Change location -> Formats -> Format.
To prevent a mix of translated and untranslated messages, I've set this format to "English (United States)".
execute the following query to your database in order to find the postgres.conf file which is loaded for the configuration:
SHOW config_file;
Edit your postgres.conf file with your prefered lc.... lc_messages,lc_numeric...etc.
i think you can change all with lc_ALL
example : lc_ALL=en_US.UTF-8
Finally execute the following command to reload conf.
SELECT pg_reload_conf();