Re: [BLACKBOX] reading with SqlODBC3

From: [at]} <Josef>
Date: Thu, 10 Dec 2009 15:48:40 +0100


Gunnar,
 
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: Bernhardt, Gunnar <mailto:gunnar.bernhardt{([at]})nowhere.xy
To: BLACKBOX{([at]})nowhere.xy
Sent: Thursday, December 10, 2009 2:31 PM
Subject: [BLACKBOX] reading with SqlODBC3


Hello,

 

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?

 

Greetings

gunnar bernhardt

 

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

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