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
hoi lam gi
NA
1
0
Fill data from database to DataGridView
Mar 2 2009 9:04 AM
Creat a form and a button on form.The name of button is "FILL".When you click on "FILL" the data form database "Northwind" is filled on dataGridview. can you fix help me? thanks! The code of event when click button: [code] private void button1_Click(object sender, EventArgs e) { string ConnectionString = "Data Source = SUPERCOMPUTER" + "Integrated Security=SSPI" + "Initial Catalog=NorthwindDataSet"; SqlConnection connect = new SqlConnection(); connect.ConnectionString = ConnectionString; string strSql = "SELECT CustomerID,ContactName,ContactTitle FROM Customers"; SqlDataAdapter dad = new SqlDataAdapter(strSql, connect); DataSet dat = new DataSet("Customers"); dad.Fill(dat,"Customers"); customersTableAdapter.Fill(northwindDataSet.Customers); [/code] }
Reply
Answers (
1
)
Networking Solution?
Gridview row insertion