Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update to AS400

Status
Not open for further replies.

cjany

IS-IT--Management
Nov 3, 2004
72
US
Is it possible to use Access to Update fields on the AS400? I have an ODBC connection, and linked tables to the AS400. I've tried creating an update query to update certain fields. Here is my SQL:

UPDATE EZTAX30DTA_TXEVNTD SET EZTAX30DTA_TXEVNTD.EI2RPLCDE = "REPLYNONE", EZTAX30DTA_TXEVNTD.EI2RPLDAT = 20061228
WHERE (((EZTAX30DTA_TXEVNTD.EI2INSSNT)="TARGETLT00") AND ((EZTAX30DTA_TXEVNTD.EI2DATDUE)=20061115) AND ((EZTAX30DTA_TXEVNTD.EI2RPLCDE)=""));

The error I get when running this query is:

ODBC-update on a linked table 'EZTAX30DTA_TXEVNTD' failed.
[IBM][iSeries Acces ODBC driver][DB2 UDB]SQL7008-TXEVNTD in EZTAX30DTA not valid for operation.

I've even tried this in a pass-through query.
I have my ODBC settings correct with Read/Write SQL Statements checked.

Any suggestions?
 
Yes, I can make changes manually to the TXEVNTD table.
 
Through your access front end you can do this?

Ignorance of certain subjects is a great part of wisdom
 
No, I cannot update the linked table from access.
 
Then it is probably an issue of permissions on your AS400's database. You should look in the forums for whatever db platform you use on this machine, and hopefully find some help there on how to modify permissions.

GOodLuck,

Alex

Ignorance of certain subjects is a great part of wisdom
 

When you link the file you should get a dialog box to select a unique record identifier, If you don't I don't think the file is updatable. I just tried this and was able to update an AS400 record.

willybgw
 
Hi,
When you had created the link to the AS400, did you select, in the list of fields that popup, a primary Key for update or edit?
(If you could not edit a field directly in the Access table, it could be the case)
Also, if you could edit a table using one of the AS400 screen, that doesn’t necessary mean that you have direct right access to the table.
Last, you should use a pass through query with the AS400 syntax, especially for date, since the action is going to be performed there.
Regards.


Jean-Paul
Montreal
To send me E-Mail, remove “USELESSCODE”.
jp@USELESSCODEsolutionsvba.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top