Hello!
I want to create a Data Source which could be displayed in a Form based on an SQL statement with multiple inner joins.
But I cannot find out how to create a new DataSet based from this SQL statement. If I create a new DataSet and add one of my necessary tables and then paste my SQL statement into the TableAdapter CommandText property field, it says JOIN is not supported.
Is there a way to use an IDE defined dataset or do I have to use an empty DataGridView and populate and format it by code?
I want to create a Data Source which could be displayed in a Form based on an SQL statement with multiple inner joins.
Code:
SELECT DISTINCT document.id AS id,
document.agreement_id,
document.terminal_code AS terminal_code,
document.num AS num,
document.document,
document.[date] AS ddate,
buyer.title AS buyer_title,
seller.title AS seller_title,
transport.title AS transport_title,
closed,
document.seller_id,
document.is_long,
document.vagon,
agreement.sample_freq
FROM (((document INNER JOIN company AS buyer ON document.buyer_id = buyer.id)
INNER JOIN
company AS seller ON document.seller_id = seller.id)
INNER JOIN
company AS transport ON document.transport_id = transport.id)
INNER JOIN
agreement ON document.agreement_id = agreement.id AND agreement.typ = 'S';
Is there a way to use an IDE defined dataset or do I have to use an empty DataGridView and populate and format it by code?