G
Guest
Hi,
I created a stored proc in SQL Server 2000 that returns the result of a left
outer join. For example:
CREATE PROCEDURE MyProc ... AS
BEGIN
SELECT ...
FROM TableA AS A LEFT OUTER JOIN TableB AS B ON A.KeyA = B.KeyB
WHERE ...
END
When I call the stored procedure in the query analyser, I get the correct
result. When I use an ADO.Net in my C# application, I only get the rows for
which no match was found in table TableB (and thus only get null fields for
my B table).
To excute the SP, I call the SqlCommand.ExecuteReader() method after adding
my parameters and setting my CommandType to StoredProcedure. I tried using
both datasets and datareaders but they both have the problem.
I created a stored proc in SQL Server 2000 that returns the result of a left
outer join. For example:
CREATE PROCEDURE MyProc ... AS
BEGIN
SELECT ...
FROM TableA AS A LEFT OUTER JOIN TableB AS B ON A.KeyA = B.KeyB
WHERE ...
END
When I call the stored procedure in the query analyser, I get the correct
result. When I use an ADO.Net in my C# application, I only get the rows for
which no match was found in table TableB (and thus only get null fields for
my B table).
To excute the SP, I call the SqlCommand.ExecuteReader() method after adding
my parameters and setting my CommandType to StoredProcedure. I tried using
both datasets and datareaders but they both have the problem.