Access to AS400 with ODBC: Error SQL 7008

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Giovanna
Posts: 25
Joined: Tue 21 Jul 2009 07:44
Location: Italy

Access to AS400 with ODBC: Error SQL 7008

Post by Giovanna » Tue 13 Apr 2010 07:36

I try to access at AS400 table with ODBC driver and when i try to edit a table with component TUniTable i have an error:
[IBM][ISeries Access ODBC Driver][DB2 ODB] SQL 7008 - Table not valid for operation
This table is not under journal.
Best Regard.
Giovanna Cellitti.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Tue 13 Apr 2010 08:52

Hello

This error is unique to DB2 on the AS/400. The DB2 error SQL7008 is returned when an update is attempted to a table on the AS/400 that is not journalled with an Isolation Level that requires journalling. There are two way to resolve this error.

1. Enable journalling for the table you are attempting to update.
2. Set your Isolation level to NONE (5.0 and Higher) or NO_COMMIT (all previous versions).

Giovanna
Posts: 25
Joined: Tue 21 Jul 2009 07:44
Location: Italy

Set isolation level

Post by Giovanna » Tue 13 Apr 2010 09:11

I try to set IsolationLevel= 'ilReadUnCommitted' on the UniTransaction component and i have same problem. Why?
Thank you.
Giovanna Cellitti

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Wed 14 Apr 2010 09:51

To resolve your issue you should change the settings of your ODBC driver (not TUniConnection).

A step by step instruction for changing settings of your ODBC driver you can find here:
http://www.microsoft.com/communities/ne ... &sloc=&p=1

But if you want to turn on journaling for the table you can find more detailed information about it here:
http://www.websina.com/bugzero/faq/exception-as400.html

Giovanna
Posts: 25
Joined: Tue 21 Jul 2009 07:44
Location: Italy

Post by Giovanna » Tue 20 Apr 2010 08:01

I had already set the option to 'Commit' to 'NONE' but with a version of the ODBC driver 09.00.08.00, as suggested i updated the driver.
After i tried to do step by step as suggested but I have the same problem. I resolve only if I put on Journaling, what should I do?
Thank you
Giovanna Cellitti

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Wed 21 Apr 2010 08:27

Our UniDAC components are using functionality and behaviour of the ODBC drivers installed on your computer. Unfortunately we can not change the ODBC drivers behaviour. If you are not satisfied with the driver work or you can not set it up properly, you should ask this ODBC driver's developer.

Giovanna
Posts: 25
Joined: Tue 21 Jul 2009 07:44
Location: Italy

Post by Giovanna » Wed 21 Apr 2010 14:55

I tried to connect with HIT driver ODBC and the result is not changed. If the problem is the driver ODBC (client access/HIT) why only with yours TUniTable component i have problem? I have no problem with TTable component...
Thank you
Giovanna Cellitti

Giovanna
Posts: 25
Joined: Tue 21 Jul 2009 07:44
Location: Italy

Re: Access to AS400 with ODBC: Error SQL 7008

Post by Giovanna » Wed 12 Mar 2014 10:56

I solved it by replacing TUniTable with TUniQuery. :D

Best regards

Giovanna Cellitti

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: Access to AS400 with ODBC: Error SQL 7008

Post by Dimon » Wed 12 Mar 2014 15:39

It is good to see that the problem has been solved. Feel free to contact us if you have any further problems.

alfredalfred
Posts: 1
Joined: Tue 03 May 2016 06:18

Re: Access to AS400 with ODBC: Error SQL 7008

Post by alfredalfred » Tue 03 May 2016 06:20

why only with yours TUniTable component i have problem? I have no problem with TTable component...
Thank you


waleeed

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Access to AS400 with ODBC: Error SQL 7008

Post by MaximG » Thu 19 May 2016 13:31

Please clarify whether the issue is reproduced if you replace the TUniTable component with TUniQuery.

C32
Posts: 2
Joined: Sun 27 Mar 2022 18:48

Re: Access to AS400 with ODBC: Error SQL 7008

Post by C32 » Sun 27 Mar 2022 18:52

Hi,

Could someone please help to know how to create and resolve this error mentioned in subject line of this thread?

For the file which is not journaled and even journaled, I tried all the below Commit mode options in Advance server options still could not generate this error :-

Commit mode:

Commit immediate(*None)
Read uncommited (*CHG)
Read commited(*CS)
Repeatable read (*ALL)
Serializable (*RR)

***************************
also tried by changing various Connection types available under IBM i Access Windows ODBC Driver Connect:

1) Use ODBC access mode
2) Use ODBC access mode, Call allowed
3) Limit to Read/Call(Select and Call statements allowed)
4) Limit to Read-Only (Select statements only)

But could not generate that error(SQL7008).

So someone could please advise how to create this error and then resolve this error so that it will help to understand this error in a better way?



Thanks

C32
Posts: 2
Joined: Sun 27 Mar 2022 18:48

Re: Access to AS400 with ODBC: Error SQL 7008

Post by C32 » Mon 28 Mar 2022 04:37

Hi,

Could someone please advise ?


Thanks.

Post Reply