TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Soumya Surendran
NA
170
0
How to retrieve data from two tables
Oct 6 2009 7:18 AM
hai...expert....plz help me
i want to retrieve data from two tables and the result should be displyed in datagrid..i have used the following code...But its not working correctly...
OleDbDataAdapter
ad =
new
OleDbDataAdapter
(
"Select Voucher_no,TRANS_From,TRANS_To from Stock_Transfer_Master"
, con);
DataSet
ds =
new
DataSet
();
ad.Fill(ds,
"Stock_Transfer_Master"
);
ad.SelectCommand =
new
OleDbCommand
(
"select Item_Code,Item_Name,Qty,Amount from Stock_Transfer_Details"
, con);
ad.Fill(ds,
"Stock_Transfer_Details"
);
dataGridView1.DataSource=ds;
dataGridView1.DataMember = ds.Tables[0].ToString();
dataGridView1.DataMember = ds.Tables[1].ToString();
thanks in advance..........
Reply
Answers (
2
)
Enter key as a tab
Windows Bankig Apllication