[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

I have nothing to do with ORA-01756!

Zhou Li

10/22/2007 1:13:00 PM

I have create a oracle 9i (9.2) database and set its characterset to
UTF8. After I create a table named man, together with controllers and
scaffold with ruby, I log on to the page "New Man" and input 3 chinese
characters and commit. But the server prompt me that, an ORA-01756 has
happened. Strangely, if I input 4 chinese or 3 chinese characters
ended up with an English character, it runs well.

Is there anyone met this strange problem? I am looking forward
pressingly to the reply.

Thank you in advance.

2 Answers

Robert Klemme

10/22/2007 1:23:00 PM

0

2007/10/22, lzcarl@gmail.com <lzcarl@gmail.com>:
> I have create a oracle 9i (9.2) database and set its characterset to
> UTF8. After I create a table named man, together with controllers and
> scaffold with ruby, I log on to the page "New Man" and input 3 chinese
> characters and commit. But the server prompt me that, an ORA-01756 has
> happened. Strangely, if I input 4 chinese or 3 chinese characters
> ended up with an English character, it runs well.
>
> Is there anyone met this strange problem? I am looking forward
> pressingly to the reply.

Just a wild guess since I have zero Rails experience: I see these
potential sources of your problem:
- the DB connectivity layer does not properly deal with non ASCII text
- Rails does not properly deal with non ASCII text

For example, it could be that no bind variables are used.

Kind regards

robert

Todd Benson

10/22/2007 1:28:00 PM

0

On 10/22/07, lzcarl@gmail.com <lzcarl@gmail.com> wrote:
> I have create a oracle 9i (9.2) database and set its characterset to
> UTF8. After I create a table named man, together with controllers and
> scaffold with ruby, I log on to the page "New Man" and input 3 chinese
> characters and commit. But the server prompt me that, an ORA-01756 has
> happened. Strangely, if I input 4 chinese or 3 chinese characters
> ended up with an English character, it runs well.
>
> Is there anyone met this strange problem? I am looking forward
> pressingly to the reply.
>
> Thank you in advance.

You are receiving a string termination error, usually due to a missing
end quote ' . You need to find out what the real query is that your
scaffold is sending to the database, then you can troubleshoot. A
missing end quote can happen for a number of reasons.

Most likely, like Robert suggested, your scaffold and Oracle are not
playing well together.

Todd