DB2 Connect - Unicode Support from VB Application - unicode

I am trying to insert '€' char in Db2 Database. My Db2 database is in zOS. (v.8.0) and my Db2 client version is 9.1 FP5. I am trying this using ODBC Connection via ADODB in Visual Basic or C# code.
But junk char is getting inserted. '€' symbol is not inserting.
Is there any option to set the CodePage 1252 at connection level?

Used DISABLEUNICODE = '1' to SELECT / INSERT '€' symbols from VB

Related

Reverse engineer PostgreSQL database in Visio results in error

I understand that to reverse engineer a database in Visio you require a ODBC data source name. I created one using the PostgreSQL Unicode(x64) driver.
In the Visio Reverse Engineering Wizard, you can select from Microsoft SQL Server, ODBC Generic Driver, and Oracle Server. The created DSNs show only up under Microsoft SQL Server and Oracle Server; when selecting the ODBC Generic Driver, there are no Data sources. When I create one using the New button, it again shows up under both the Microsoft SQL Server and Oracle Server.
When I select the DSN from either list, I can enter the User and Password, but get the one of the following errors:
Oracle driver: Warning! You are using a Visio 'Oracle Server' driver to connect with a 'PostgreSQL' DBMS datasource. By using an incompatible driver, it is possible that the catalog information retrieved will be incomplete.
Microsoft SQL driver: Function sequence error
In both cases, I am unable to generate a diagram. Any thoughts?
The "Setup" button next to the installed Visio drivers allows you to select the ODBC drivers to use. If no ODBC driver is selected, all DSNs are displayed; if specific ODBC drivers are selected, only those DSNs which use that specific driver will be displayed.
In my case, the Microsoft SQL Server and Oracle Server Visio drivers did not specify any ODBC drivers to use so all DSNs were displayed.
On the other hand, the ODBC Generic Driver had the PostgreSQL ANSI drivers selected which resulted in my DSN using the PostgreSQL Unicode driver NOT to be displayed. Clicking on the Setup button and adding a checkmark to the PostgreSQL Unicode drivers made the DSN available for selection and the Visio was able to reverse-engineer the database.
Select ODBC drivers associated with "ODBC Generic Driver"

Azure database for postgreSQL Flexible Server and Entity Framework Core shows accented spanish words incorrectly

I have created a Flexible Server (Azure database for postgreSQL), I am using pgadmin to connect to this database (Encoding UTF8), I have a table named skills, and using pgadmin shows the spanish words correctly.
SHOW SERVER_ENCODING;
UTF8
SHOW CLIENT_ENCODING;
SQL_ASCII
The problem is when I connect entity framework core to this database, shows accented spanish words incorrectly, for example:
Publicación (Correct)
Publicaci\xf3n (Incorrect)
When I send data from Web API to database it is inserted this way
Publicación
There is an option in Azure Database for PostgreSQL flexible server is Server Parameters,
Inside there is a parameter:
client_encoding was SQL_ASCII and I changed to UTF8
then my pgadmin shows accented spanish words correctly, that was the solution

how to convert microsoft 2016 sql ddl load scripts to postgres sql

I would like to translate Microsoft SQL Server DDL and table load sql commands to the Postgres equivalent.
There are a number of tools to convert one database to another in the link below but are there parsers for ddl/sql script conversion?
https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#Microsoft_SQL_Server

Using the ADO.NET DB2 connector - can I determine which DB2 system I'm connected to?

The iSeries DB2 is very different from the Windows/Linux DB2. We need to know which because we have selects to retrieve the metadata (table names, etc.) and those selects are dependent on what DB2 we're talking to.
Is there a way, after we have a connection, to determine what DB2 product we're hitting?
thanks - dave
There is a property on the ADO.NET connection object (DB2Connection), ServerType, that returns a different value based on which product you're connected to.
I haven't been able to find an exhaustive list of what the values correspond to, but the ones I've personally run into are the following:
DB2 - z/OS DB2
DB2/LINUXX8664 - DB2 for Linux/Unix/Windows running on 64-Bit Linux
DB2/NT - DB2 for Linux/Unix/Windows running on Windows (32 bit?)
DB2/NT64 - DB2 for Linux/Unix/Windows running on Windows (64 bit)
May by whith db2 connect or db2 lelvel
check this
select catalog_name from qsys2/catalog_name
It's a one liner that returns a name.

Informix SE to PostgreSQL data migration

I'm rewriting an old application running on SCO Unix that connects to an Informix SE 7.24 database. The target os is RHEL 6.3 and the dbms is PostgreSQL 9.4.
I've already adapted the DDL script and created the empty database but now I'm looking for a way to migrate data. Informix and PostgreSQL are using two different character set, CP437 and UTF8.
I've tried to export the database with the dbexport utility, converted *.unl files to the new charset and then loaded with the COPY table_name FROM 'table.unl' (DELIMITER '|', ENCODING 'UTF-8', NULL ''). This worked for most of the tables but when the size of the .unl file grows (over 1GB), the import process crash. What can I do?
You have not show us COPY error message.
I migrated some databases and one of the easiest way is to use JDBC especially with Jython (Python that works on JVM). You can see such migration in my response: Blob's migration data from Informix to Postgres Of course you must change it to use your schema, but with JDBC it is easy to read table names and other schema info.