[DB-SIG] MS SQL Server and odbc getting 'None'

Carey David SSgt 109CF/SCBJ David.Carey at nyscot.ang.af.mil
Fri Aug 6 15:04:02 CEST 2004


  I'm using the regular odbc (not the mxODBC) with microsoft SQL Server
2000. I'm
programming on windows for the platform, and switching databases is not an

I have been using odbc with great success. I have been receiving fine from
queries, and inputting fine with insert queries, etc.

I just have one problem. When I pull data from some tables, some fields come
back 'None'.
Now I know there is data in that field. I also know that it is a nvarchar
type which is a
unicode type. So some fields I have are "regular" and others are unicode. I
have no problem
inserting or updating to these fields, just a problem reading them. Does
anyone know of a 
way to remedy this?

Also is there a way in Python to covert a variable holding a string to a
unicode type?

For example:

VariableXYZ = 'This is a string'


Now I realize the above example obviously won't work, but I think it
illustrates what I would
like to do in some instances.


More information about the DB-SIG mailing list