From: Marc (klists@saphor.de)
Date: Tue Aug 12 2003 - 11:05:03 EDT
> I might be able to help.
Great!
> Two questions:
>
> 1. How firmly have you tracked down the point at which this conversion
> happens?
I assume it happens when the array dbdata is filled. I insert here the
VB 6 demo script:
-------------
Dim adoCon As ADODB.Connection
Set adoCon = New ADODB.Connection
adoCon.ConnectionString = "UnicodeSQL" 'The SQL-Server datasource
adoCon.Open
Set adoRS = adoCon.Execute("Select * from unicodetest")
adoRS.MoveFirst
dbdata = adoRS.GetRows() 'hole alle Spalten ab
---------
The text entries in dbdata do not contain any non-CP1252-characters as
they should.
The corresponding python script is quite analogous:
----------------
import win32com.client
adoCon = win32com.client.Dispatch('ADODB.Connection')
adoCon.Open('UnicodeSQL')
(adoRS, success) = adoCon.Execute('Select * from unicodetest')
adoRS.MoveFirst()
data = adoRS.GetRows()
-------------------
The entries in data contain the data as it is in the database (including
all non-cp1252-characters)
>
> 2. What is the datatype in the database? (text BLOB?, ntext BLOB? varchar?)
The sample database which I created for this purpose has three fields of
types:
int, ntext and nvarchar
The ntext and nvarchar fields contain identical data and behave
identically.
Best regards,
Marc
This archive was generated by hypermail 2.1.5 : Tue Aug 12 2003 - 11:41:00 EDT