As400 database encoding - not valid for operation error and jdbc connection url questions.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ivan_siviero
Posted On:   Friday, May 24, 2002 05:17 AM

Hi everyone I'm developing an application which accesses data from AS400 database system. I'm running into two problems.Here they are The first one seems quite simple to solve for you AS400 gurus as it's a database enconding problem. I have to host some italian special chars like &egrave &agrave and so on, so i'm wondering how to set this feature. Is it possible to pass it from the JDBC connection url? The other problem is the 'TABLENAME in LIBRARY not valid for operation.' error. . This only happens in some tables when updating deleting or inserting rows. Through the JDBC connection url i set the propery 'transaction isolation=none'    More>>

Hi everyone

I'm developing an application which accesses data from AS400 database system.

I'm running into two problems.Here they are

The first one seems quite simple to solve for you AS400 gurus as it's a database enconding problem.

I have to host some italian special chars like &egrave &agrave and so on, so i'm wondering how to set this feature.

Is it possible to pass it from the JDBC connection url?


The other problem is the 'TABLENAME in LIBRARY not valid for operation.' error.
.
This only happens in some tables when updating deleting or inserting rows.

Through the JDBC connection url i set the propery 'transaction isolation=none' .This affords me to insert delete and update rows in some table but not in other ones which raise the 'not valid for operation' .Plus, since the error has occurred i can't perform any operation on the db as i get the 'Cursor state not valid' error.

Somewhere i have read the 'not valid for operation' error can be avoided by setting the autocommit to false.As i can't write something like connection.setAutocommit(false) in my application i was wondering if this can be done through the jdbc connection url parameter.

I have also read it is possible to avoid the error by allowing journaling on tables.Is that right ?

Is there another value of 'transaction isolation' i can pass through the JDBC connection url to avoid the 'not valid for operation' error without causing the 'Cursor state not valid' error ?

Thanks for your support.

Ivan.

   <<Less

Re: As400 database encoding - not valid for operation error and jdbc connection url questions.

Posted By:   Anonymous  
Posted On:   Wednesday, August 7, 2002 07:12 AM

Ivan,

The answer to your first question might be the use of an AS400 JDBC driver keyword, which works for Greek chars, so I think, will work for Italian, too. In the connection specs try something like :




jdbc:as400:myAS400;translate binary=true


In this case replace myAS400 with the system name that responds to your system.


Regarding your 2nd question, YES, you must activate journaling to all your tables, otherwise commitment control and transaction isolation will not operate properly. In this case use the OS400 command STRJRNPF to activate it, defining the filename(s).


In case you want to use a different isolation policy on your transactions you can use the following keywords:



jdbc:as400:myAS400;translate binary=true;transaction isolation=none


Instead of "none" you can use "read committed","read uncommitted", "repeatable read" or "serializable".



In case you want more info, try the following url which will get to a very Interesting IBM redbook. On page 139, you can find all the info you need:


http://www.redbooks.ibm.com/pubs/pdfs/redbooks/sg246245.pdf


Hope this was of help....

About | Sitemap | Contact