You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-user@db.apache.org by Jun Li <al...@gmail.com> on 2006/04/26 02:35:46 UTC

Report varchar for nvarchar on SQL Server.

The xml file generated use varchar for columns that defined as nvarchar on
SQL Server.
That is a problem because if I create a live database from xml file the type
of the column will be created as varchar which should be nvarchar. I need
nvarchar to store characters from language other than English.

--
--------------
Cheers,
Jun

Re: Report varchar for nvarchar on SQL Server.

Posted by Christoffer Hammarström <kr...@imcode.com>.
I created jira-issue http://issues.apache.org/jira/browse/DDLUTILS-108

	Kreiger

Re: Report varchar for nvarchar on SQL Server.

Posted by Christoffer Hammarström <kr...@imcode.com>.
Thomas Dudziak wrote:
> On 4/28/06, Jun Li <al...@gmail.com> wrote:
> 
>> Why don't you simply mapping varchar into nvarchar? It's just about
>> storage
>> space.
> 
> 
> Most schemas that I have worked with, have used varchar instead of
> nvarchar and rather set the database language to a specific value. So,
> nvarchar would limit DdlUtils' usability even more. The only useful
> solution would be the introduction of the notion of fully supported
> unicode and non-unicode modes in DdlUtils.
> 
> Tom
> 

I need to store (for example) the contents of

http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt

in an NTEXT field in an SQL Server database generated with ddlutils.

What are my options? Should i create a jira-issue?

	Christoffer "Kreiger" Hammarström


Re: Report varchar for nvarchar on SQL Server.

Posted by Thomas Dudziak <to...@gmail.com>.
On 4/28/06, Jun Li <al...@gmail.com> wrote:

> Why don't you simply mapping varchar into nvarchar? It's just about storage
> space.

Most schemas that I have worked with, have used varchar instead of
nvarchar and rather set the database language to a specific value. So,
nvarchar would limit DdlUtils' usability even more. The only useful
solution would be the introduction of the notion of fully supported
unicode and non-unicode modes in DdlUtils.

Tom

Re: Report varchar for nvarchar on SQL Server.

Posted by Jun Li <al...@gmail.com>.
Why don't you simply mapping varchar into nvarchar? It's just about storage
space.


On 4/28/06, Thomas Dudziak <to...@gmail.com> wrote:
>
> On 4/26/06, Jun Li <al...@gmail.com> wrote:
>
> Yes, well, currently DdlUtils does not support Unicode vs. Non-Unicode
> directly (i.e. via a property). And since you also cannot currently
> override type mappings, using Unicode is somewhat hard on Oracle or
> SQL Server.
> For the latter you might perhaps get away by changing the codepage:
>
> SELECT COLLATIONPROPERTY('Latin1_General_CI_AI', 'CodePage')
>
> Tom
>



--
--------------
Cheers,
Jun

Re: Report varchar for nvarchar on SQL Server.

Posted by Thomas Dudziak <to...@gmail.com>.
On 4/26/06, Jun Li <al...@gmail.com> wrote:

> The xml file generated use varchar for columns that defined as nvarchar on
> SQL Server.
> That is a problem because if I create a live database from xml file the type
> of the column will be created as varchar which should be nvarchar. I need
> nvarchar to store characters from language other than English.

Yes, well, currently DdlUtils does not support Unicode vs. Non-Unicode
directly (i.e. via a property). And since you also cannot currently
override type mappings, using Unicode is somewhat hard on Oracle or
SQL Server.
For the latter you might perhaps get away by changing the codepage:

SELECT COLLATIONPROPERTY('Latin1_General_CI_AI', 'CodePage')

Tom