J
jp2msft
Is there a limit to the string length for sending SQL queries to the SQL
Server in Visual Studio 2005 Professional?
I have a query that I can run in VS using an SqlDataAdapter, and it returns
0 rows.
If I paste this same query into Query Analyzer, it returns 7016 rows.
VS and QA are using the same SQL Server, same tables, etc.
I have other queries in VS using the same SQL Server (i.e. same connection
string), and these DataTables fill just fine.
There is no error; the query just returns 0 rows.
Here is the query, and this is the exact string that I pass to the SQL
Server from VS:
SELECT TR.[OP_ID], EI.[NUM], TR.[Date_Time]
FROM Test_Results TR LEFT JOIN EmployeeInfo EI ON OP_ID=EI.[FIRSTNAME]+'
'+EI.[LASTNAME]
WHERE
(TR.[System_ID] Like '%Decay%') AND
(EI.[JOBTITLE]='BRZ OPRTR') AND
(EI.[NUM] IS NOT NULL) AND
('7/1/2008' < TR.[Date_Time]) AND
(TR.[Date_Time] < '7/31/2008')
ORDER BY OP_ID, TR.[Date_Time]
Is this too long of a string to pass through VS?
How can I debug this?
Server in Visual Studio 2005 Professional?
I have a query that I can run in VS using an SqlDataAdapter, and it returns
0 rows.
If I paste this same query into Query Analyzer, it returns 7016 rows.
VS and QA are using the same SQL Server, same tables, etc.
I have other queries in VS using the same SQL Server (i.e. same connection
string), and these DataTables fill just fine.
There is no error; the query just returns 0 rows.
Here is the query, and this is the exact string that I pass to the SQL
Server from VS:
SELECT TR.[OP_ID], EI.[NUM], TR.[Date_Time]
FROM Test_Results TR LEFT JOIN EmployeeInfo EI ON OP_ID=EI.[FIRSTNAME]+'
'+EI.[LASTNAME]
WHERE
(TR.[System_ID] Like '%Decay%') AND
(EI.[JOBTITLE]='BRZ OPRTR') AND
(EI.[NUM] IS NOT NULL) AND
('7/1/2008' < TR.[Date_Time]) AND
(TR.[Date_Time] < '7/31/2008')
ORDER BY OP_ID, TR.[Date_Time]
Is this too long of a string to pass through VS?
How can I debug this?