20 pts.
 with Delphi-adoquery AS400 to access
My question is, with Delphi-adoquery AS400 to access, but I have AS400 member at my table. How should we proceed, I need urgent help. Thank you for everything Library table field names: my library narpak2: tables mgpyvm: Members narpak2009

Software/Hardware used:
ASKED: June 18, 2010  7:28 AM
UPDATED: June 21, 2010  9:07 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

tables mgpyvm: Members narpak2009

The name of the member is not the same as the name of the table. The likely possibility as that this is not a SQL TABLE, but rather a DDS physical file (PF). Also, there is a significant chance that this PF has multiple members.

Does any of that describe your ‘table’? SQL has no concept of “members”. If Delphi ADO queries use SQL, then special handling is probably needed.

Tom

 110,175 pts.

 

Thanks. I made a lot of research, and I found the answer :) .
First time with adocommand object I made the Alias
“CREATE ALIAS NARPAK2/MGPYVM2009 FOR NARPAK2/MGPYVM (NARPAK2009)”
after I made with ado query object easily query
SELECT MYANA,MYMUA,MYDET,MYBAK ,SUM(case when MYBAK = 1 then MYTUT else 0 end)as Debt,SUM(case when MYBAK = 2 then MYTUT else 0 end)as Will,MYBTR FROM MGPYVM2009 WHERE MYANA=120 group by MYBTR, MYANA, MYMUA, MYDET, MYBAK

 20 pts.

 

CREATE ALIAS

There are two general approaches.

Creating an ALIAS results in a permanent object. That can mean ongoing requirements for authorities and auditing since anyone might access it.

The alternative is to use the SQL CALL statement to process an OVRDBF command to override the file to the member that you need. An override is temporary and disappears when DLTOVR is run or when the job ends. The OVRDBF can be processed as a command or it might be embedded within a registered stored procedure.

You would be the one to choose whether you need a permanent object or not.

Tom

 110,175 pts.