[BLACKBOX] AW: [BLACKBOX] reading with SqlODBC3

From: Bernhardt, Gunnar <"Bernhardt,>
Date: Thu, 10 Dec 2009 17:24:18 +0100



und vielen Dank für den fundierten Hinweis!


Das Problem lag nicht in der (fehlenden) Unicodeunterstüzung, das hatte ich bereits probiert.


Der Fehler tritt mit BB1.5 in der Tat nicht auf, dafür aber mit BB1.6RC5. Mit der SqlODBC3.odc aus BB1.5 funktioniert alles bestens.


Wurden vielleicht für das neue Release Umstellungen bzgl. Unicode gemacht? Für die neue Version wurden in besagtem Treiber viele ARRAY OF SHORTCHAR in ARRAY OF CHAR umgestellt. Vergleichbares könnte auch für den SqlODBC-Treiber gelten, habe ich offen gestanden nicht geprüft.




Vielen Dank für die Hilfe. Bleiben für mich noch zwei Fragen: Ist Deutsch in dieser Mailingliste zu empfehlen? Und sollte ich den Eigentümern/Entwicklern das Problem noch zeigen?


Mit freundlichem Gruß

gunnar bernhardt



Von: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
Gesendet: Donnerstag, 10. Dezember 2009 15:49
An: BLACKBOX{([at]})nowhere.xy
Betreff: Re: [BLACKBOX] reading with SqlODBC3




I cannot reproduce the problem for MS SQL Server (2000) under BB 1.5.

The test program does exactly what it is supposed to do.

There is only a dubios error message popping up when creating the table,

but this can be be ignored.


To me it seems that it is somehow related with Unicode versus ASCII.

MS SQL Server uses single byte characters for VARCHAR, which

follows the standard (if there is any).

Check if your database uses 2-byte characters.

If possible, use single byte characters.


If you need to read the sources, start with SqlOdbc3.ReadString.


- Josef



----- Original Message -----

From: <mailto:gunnar.bernhardt{([at]})nowhere.xy

To: <mailto:BLACKBOX{([at]})nowhere.xy

Sent: Thursday, December 10, 2009 2:31 PM

Subject: [BLACKBOX] reading with SqlODBC3




there seems to be a problem with the SqlDB module: Apparently you have to reserve twice the number of CHARs for reading into records, while writing is working fine.


Attached you can find some sample code (Subsystem Test) that should reproduce the problem: It creates a table and adds some sample data to it (command createTableWithContent). Judging from the data base content this works fine (01-databaseDefinition.png and 02-databaseContent.png). This can be verified from within Blackbox with the SQL->Browser (03-outputTextOk.png).


When reading into a record you have reserve additional characters (04-outputRecordError.png and 05-outputRecordSuccess.png). This is not a practical work around, since the limitations for the user input do not apply here.


The type of data base does not seem to be relevant. The error has occurred with MS-Access and the “SQLite ODBC Driver” (available at http://www.ch-werner.de/sqliteodbc/). Tinkering with the settings for the ODBC data source had no effect.


Before diving into the Blackbox sources I would like to ask, if anyone has had a similar problem?



gunnar bernhardt


---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to <mailto:LISTSERV{([at]})nowhere.xy

---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
Received on Thu Dec 10 2009 - 17:24:18 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:39 UTC