Re: ADO, SQL-Server and VB6

From: Marc (
Date: Tue Aug 12 2003 - 11:05:03 EDT

  • Next message: Philippe Verdy: "Re: Questions on ZWNBS - for line initial holam plus alef"

    > I might be able to help.


    > 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

    Set adoRS = adoCon.Execute("Select * from unicodetest")
    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')
    (adoRS, success) = adoCon.Execute('Select * from unicodetest')

    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

    int, ntext and nvarchar

    The ntext and nvarchar fields contain identical data and behave

    Best regards,


    This archive was generated by hypermail 2.1.5 : Tue Aug 12 2003 - 11:41:00 EDT