mxODBC SQL Type error with MS SQL Server

Dennis E. Hamilton infonuovo at email.com
Fri Mar 31 00:40:32 EST 2000


Well, I was just reading up on SQL Server 7.0 and the SQL Language that it
supports just today.  I was reading up on Transact-SQL just to learn about
SQL Server 7.0 data types.

The first thing that I learned was that Transact-SQL data types nvarchar,
nchar, and ntext, are Unicode (n for national) formatted strings.  This is
how they are named in SQL.  (They are indeed delivered in wide character
arrays in memory.)  The default internal storage of the server is Unicode,
but there is also support for 8-bit character codes, (transported with
string types called, naturally, varchar, char and text).  I don't know what
you get to do to switch for access to these via mxODBC, but it would seem
the direct thing to do.  Is your data anything that couldn't be represented
in the ANSI character code (code page 1252 in SQL Server parlance)?

Other than that, I have nothing to add by way of hope.

Oh, and I am looking at the SQL Server Books Online, part of the SQL Server
Developer Edition that pops up when I load the MSDE for Visual Studio 6.0
CD-ROM.  This is part of the Microsoft Visual Studio 6.0 Plus Pack that
ships with current versions of Visual Studio 6.0 Professional.

On the MSDN Library, January 2000 edition, there seems to be what you want
in the path

Platform SDK / Data Access Services / Microsoft SQL Server Programmer's
Toolkit / and places below such as Building SQL Server Applications.

I assume that the same material is available on MSDN On-Line.

I have no mastery of this.  I just stumbled upon it.

-- Dennis

-----Original Message-----
From: python-list-admin at python.org
[mailto:python-list-admin at python.org]On Behalf Of M.-A. Lemburg
Sent: Thursday, March 30, 2000 00:57
To: Bill Hunter; Python List @ Python.org
Subject: Re: mxODBC SQL Type error with MS SQL Server


Bill Hunter wrote:
>
> The mysterious type that mxODBC cannot handle on SQL Server 7 is
> "nvarchar" - unfortunately this is the default that SQL Server
> attempts to use for character strings!
>
[ ... ]

Ehm, you probably mean "wvarchar" ... I suspect this to be
a wide character VARCHAR field. Adding Unicode to mxODBC is
on the list, but not yet done (have to get the Python
Unicode support rock solid first).

[ ... example of how to do the down-shifting in a conversion layer ...]

BTW, does anyone have a pointer to the specifications
behind the Unicode support in SQL Server or the latest
ODBC variant ?

--
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/



--
http://www.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list