Click here to Skip to main content
15,893,190 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi,
I have two tables, one contains income and other contains expense.
There are DATE coloumns in both (type Datetime, size 8) Same properties for both. I am trying to pick data from these tables using datetimepicker.
Code is as follows:
C#
Me.taGetExpense.Fill(Me.DsGetExpense.tblExpenseSide, dpkCashBook.Value)
Me.taGetIncome.Fill(Me.DsGetIncome.tblIncomeSide, dpkCashBook.Value)


I have checked both my tables contain two records but when I run the code above, expense side show 2 records but income side shows 0
I also checked value of dpkCashBook, it remains the same for both.


I tried everything but nothing changed.
Could anybody advise me why this is happening?

Thanks a lot,
Furqan
Posted
Updated 4-Mar-11 0:47am
v2
Comments
Sandeep Mewara 4-Mar-11 6:53am    
This is Dataadapter code:
Me.taGetIncome.Fill(Me.DsGetIncome.tblIncomeSide, dpkCashBook.Value) Right?

What is the second parameter cash here? Further, how do you populate Adapter.
Furqan Sehgal 4-Mar-11 10:18am    
Why is the second parameter required? I just need to pick up the data that comes under given date.
Simon_Whale 4-Mar-11 11:06am    
have you checked the query directly on the database?
Also check it with the values that you are passing the income table adapter
ulyses31 7-Mar-11 0:51am    
are you using SQL server data? if your data has date and time. your dataset parameter should be >= @date_value

1 solution

Could you post your adapter fill query for the expense table?
In all probability you have gotten the query mistaken
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900