This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, We are using Lightspeed (2.2.1235.11865) with Oracle 9. I am seeing the following problem: I have a string that I can't represent properly here but it is a string containing a single char of ascii 148 (right double quote). I am trying to store this string in a database column configured as a string <=128. The problem is when I retrieve it, the string ends up being a single char of ascii 191 (upside down question mark) As far as I can tell it is stored in the DB as the wrong char 191. I'm guessing it is a character set thing, but I'm at a loss on how to deal with it? Thanks Bert |
|
|
Hi, I hate to bump this, but I'm still struggling with this. Any help would be great. Thanks Bert |
|
|
Sorry Bert, we've been a bit tied up with a conference for the last few days. I apologise for the delay and I'll be looking at it this morning. |
|
|
This sounds like it is a code page or encoding issue rather than a LightSpeed issue, and may therefore need to be resolved within the Oracle part of the stack (or even at the point where you are reading in the data, e.g. if you are reading in from an ANSI text file rather than Unicode). Could you try the following test: * Load the text in the same way that you do in the real scenario. Dump each character to verify that .NET really has read in the quote character as you expect it to. It may also be worth dumping the Unicode value (Trace.WriteLine((int)ch);) so as to know the canonical representation. * Using the raw ADO.NET connection and command objects from the appropriate provider (System.Data.OracleClient or Oracle.DataAccess), run a parameterised query with the same text you're using with LightSpeed, e.g. cmd.CommandText = "INSERT INTO MyTable (Id, SomeText) VALUES (:p0, :p1)"; Be sure to do the insert into the same table that's giving you trouble, and using the same connection string, in case either of these has any character set-affecting options. Be sure to use parameters so as to emulate the INSERT statement that LightSpeed would be emitting. * Check whether the value was stored correctly. If the error still happens when using raw ADO.NET, you will probably need to get advice on an Oracle forum. If all seems well at the Oracle level, then we will investigate the LightSpeed side of things. In this case it would be handy to have repro code, including the Oracle database/table creation statements, so that we can be sure we are testing the exact same insert string and have the same Oracle character set settings. Also please let us know which Oracle provider you are using -- Oracle9 (Microsoft client) or Oracle9Odp (Oracle ODP.NET). You can attach a zip file via the Options tab, or mail to ivan @ the obvious domain name (please remove all binaries first). Thanks! |
|
|
Thanks Ivan, After trying it out with ADO I saw the same symptoms so I will look elsewhere for the answer.
Thanks Bert |
|