Highlighted
Absent Member.
Absent Member.
534 views

Join Query

Jump to solution

Hi , 

In Embedded SQL we could write a Join SQL query and get the desired results from two or more table in one go.

But in ADO.Net , we create a dataset for two table and define a relation between them. And get the desired rows by using Parent and Children Relation in the Cursors. So i am writing two querys in case where i could fetch records using One single query.

Do we have any other way where i can implement Join query in simpler way in Visual COBOL ADO.Net.

Regards,

Zoeb

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Join Query

Jump to solution

If you are using the EXEC ADO DECLARE DATAROWS syntax to selected multiple rows from a dataset then this is the only way you can reference multiple related tables as a DATAROW is a collection of rows from a particular table.

If instead of using an internal dataset you were selecting data from the actual database on disk then you can still use all of the EXEC SQL statements that allow joins, etc., even in a .NET program.

View solution in original post

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Join Query

Jump to solution

If you are using the EXEC ADO DECLARE DATAROWS syntax to selected multiple rows from a dataset then this is the only way you can reference multiple related tables as a DATAROW is a collection of rows from a particular table.

If instead of using an internal dataset you were selecting data from the actual database on disk then you can still use all of the EXEC SQL statements that allow joins, etc., even in a .NET program.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.