Try removing the date type parameter in where clause and test again And I faced such problem With typed dataset where "Over" not work(IMO), so I guess it will not work here too. Use SPs instead if possible.
Try removing the date type parameter in where clause and test again. And I faced such problem With typed dataset where "Over" not work(IMO), so I guess it will not work here too. Use SPs instead if possible.
I do not understand your comment. I know about the differences between queries and SPs, but how would an SP help me here. My table ends up with the right columns, just no data.
– Nik Feb 7 at 19:42 I guess the actual problem lies with plain sql query which uses Row_Number And Over. And I faced such issues with typeddatasets while doing custom pagination. So later on I moved that queries too Stored Procedure and that worked.So as I said if possible try placing it into SP.
– alliswell Feb 7 at 19:46 Ended up creating a stored procedure, though with that I also had to pass my date and time parameters as strings and convert them inside of the SP. – Nik Feb 8 at 14:49 1 "I also had to pass my date and time parameters as strings" - I suspect passing them as strings was your problem. You should have passed them as SqlDateTime.
Probably the date format of your string did not match that used by the connection. – Joe Feb 9 at 20:03.
One thing you could try might be to run ExecuteReader and iterate through the results. IDataReader reader = m_areaDataAdapter.SelectCommand.ExecuteReader(); while(reader.Read()) { ... } This might help you to see if the problem is with your command, or with your DataTable. I know the parameters are being added correctly, I know that data exists for the given query When you're debugging, you should question all your assumptions, including this one.
Note also that when executing queries manually using SSMSE, your connection may be configured differently (e.g. ANSI NULLS, ANSI PADDING) and therefore give different results. EDIT In response to Nik's comment, here are some suggestions for debugging this. Run similar code, but modifying the query so that it does not have any parameters (i.e.
Hardwired values for start/end date, area, start/end row). If this doesn't work, then it seems likely that your connection may be configured differently from SSMSE. If it does work, then ... Add parameters to your query one by one until it fails.
You will then be able to identify which parameter caused it to fail. Likely the penny will drop and you'll see why (e.g. Parameter name misspelt? ), if not, post the code here.
The data reader isn't returning any data either. I say the parameters are being added correctly because before stuff executes, I check the parameters and their values in memory, and they are set right.Is there something that I have to explicitly say to use parameters? – Nik Feb 7 at 19:39.
Are you accessing the query through a webservice that executes the ADO. NET call? If the server's timezone is different, the values for @StartDate and @EndDate may not be what you expect.
There may be problem between your join by Multiple WHERE Clause. You have to find out that whatever table are join on specific ID is correct or not as per your database table and data.
Run similar code, but modifying the query so that it does not have any parameters (i.e. Hardwired values for start/end date, area, start/end row). If this doesn't work, then it seems likely that your connection may be configured differently from SSMSE.
Add parameters to your query one by one until it fails. You will then be able to identify which parameter caused it to fail. Likely the penny will drop and you'll see why (e.g. Parameter name misspelt?), if not, post the code here.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.