hi
how to save 'expencename','expence amount','income name','income amount' in a grid.these are in databse with seperate tables.i have to use select query but there is no common fields for both tables..how should i?but month and year must pass as parameter...(1)first i need to select from expense and income tables,already running with different fields(2)then i have to save all columns(means four)using dimensional array.
Wim SturkenboomPosted Sep 22, 2014, 7:51 AM
If there is no relationship between the two tables, it's impossible to link the two together. It should also not be necessary to store information in the third table as it can be calculated.
If I look at your second table (what's the real table name?), it looks like an invoice (billing) table. It has a booking ID and I assume that it links to a table with bookings. Correct?
If not, why does it have a booking ID?
If it links to a table with bookings, what is in the booking table? Does that link by some means to the first table (last one in your above post)? What is the real table name of the 1st table?
The second table also contains a payment ID and so it might link to a payment table. If so, what does payment do in there? Isn't that already in the payment table? And what is in the payment table?
If it does not link to a table with payments, why is the payment ID in the second table?
I only have a faint idea about the first table (last one that you showed). What does exp stand for? Any other table that might use the exp ID?
Maneesh A NPosted Sep 22, 2014, 5:09 AM
2nd table
ibookingid intChecked
vpatientname varchar(50)
vtest varchar(50)
vpayment decimal(18, 0)
vbillnum varchar(50)
dbilldate datetime
1st table
in win form,month and year and datagridview and total exptextbox,totalinctextbox and net income
Wim SturkenboomPosted Sep 22, 2014, 4:19 AM
Next is that your question is not quite clear. Do you want to show the result of a query in a grid or do you want to save the information in a grid to a database or to a file?