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
jarabud
NA
4
0
Bind DataRelation to DataList
Dec 11 2004 4:15 PM
How do I bind datarelation to either datalist or datagrid control here what I understanded so far. SqlConnection nwindConn = new SqlConnection("Data Source=localhost;" + "Integrated Security=SSPI;Initial Catalog=Northwind;"); SqlDataAdapter custDA = new SqlDataAdapter("SELECT CustomerID, CompanyName FROM Customers", nwindConn); SqlDataAdapter orderDA = new SqlDataAdapter("SELECT OrderID, CustomerID, OrderDate FROM Orders", nwindConn); nwindConn.Open(); DataSet custDS = new DataSet("CustomerOrders"); custDA.Fill(custDS, "Customers"); orderDA.Fill(custDS, "Orders"); nwindConn.Close(); DataRelation custOrderRel = custDS.Relations.Add("CustOrders", custDS.Tables["Customers"].Columns["CustomerID"], custDS.Tables["Orders"].Columns["CustomerID"]); Thanks, Regards Jarabud
Reply
Answers (
1
)
Threads and Appdomains
I want only one instance running of my application(exe)...