Can DBMaker insert text file of UTF16 format into NCLOB column?

~ 0 min
2016-03-08 04:50

Before inserting it into NCLOB, DBMaker converts the text file to Unicode first, so if the file is saved as Unicode, it should not be converted, it can be inserted directly. So from 4.2(contain 4.2) issue, DBMaker support the command”set bfiletype Unicode/ASCII” (the default set is ASCII). With this command the Unicode text file can be inserted into NCLOB column directly.

For example:

First, converts the README.TXT to UTF16 coding, and then saves it in C:\DBMaker\4.3 directory.

 

dmSQL> create table UTF16(fileContent nclob, pk serial);

dmSQL> set bfiletype unicode;

dmSQL> insert into UTF16 values(?);

dmSQL/Val> &'C:\DBMaker\4.3\README.TXT';

1 rows inserted

dmSQL/Val> end;

dmSQL> set bfiletype ASCII;  // default setting

 

Please pay attention, before the version 4.2; DBMaker did not support the command”set bfiletype Unicode/ASCII”. So user cannot directly insert text file of UTF16 format. One method to solve is converting Unicode file to local code file first, then insert. The Second is using program, open file, and then putData with Unicode data type.

Average rating 0 (0 Votes)

You cannot comment on this entry

Tags