Solved

using openquery to update AS400 table

Posted on 2002-05-22
5
959 Views
Last Modified: 2008-02-01
Is there a way to using openquery to update a specific record in AS400?

Or anyway using T-SQL to update an individual record in AS400?

Any help will be greatly appreciated.
0
Comment
Question by:shirlng
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
johan_brohn earned 50 total points
ID: 7032330
You should be able to use OpenQuery and/or OpenRowset
to update the AS400 if you can access the AS400 with ODBC.
0
 
LVL 1

Author Comment

by:shirlng
ID: 7046978
how?
Any Code you can provide to help?
0
 
LVL 1

Expert Comment

by:johan_brohn
ID: 7047127
Step 1.
Create an ODBC System DSN for the AS 400 on your machine.
U must have the ODBC drivers installed.

Step2.
Add linked server. Choose 'OLE DB Provider for ODBC' and
enter the default database name in the 'Catalog:' field.
Enter the name of the DSN in the 'Data source field:'.

Select the Security tab for the linked server and check the lowest radio button ('be made using ....') and enter username and password.

Step 3.
Test the linked server.

Step 4
UPDATE OPENQUERY(NameOfLinkedServer,
'SELECT Field FROM DB.Schema.Table')
SET FIELD = Value

OR JUST USE

UPDATE NameOfLinkedServer.DB.Schema.Table
SET FIELD = Value
0
 
LVL 1

Expert Comment

by:johan_brohn
ID: 7047137
0
 
LVL 1

Author Comment

by:shirlng
ID: 7074144
thanks so mucn, sorry for the delay.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question