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
syphor
NA
1
0
MySQL Result into a DataGrid
Oct 9 2003 10:16 AM
Hey All, I have created a .net Windows program using C#. It connects to a mysql server, access the database, query's a table and stores the results in a datagrid. The problem that I'm having with the following code is that in the datagrid, it has the table name as a link then when you click on the link it displays the values from the table. Here is the code I'm using. System.Data.OleDb.OleDbDataAdapter adp; DataSet ds = new DataSet(); // Set connection properties mysqlConnection = new System.Data.OleDb.OleDbConnection( "Provider=MySQLProv;Data Source=test;User Id=root;Password=;" ); adp = new System.Data.OleDb.OleDbDataAdapter( "Select bam from test", mysqlConnection ); // Open the Connection mysqlConnection.Open(); // Get the values adp.Fill( ds, "test" ); // Apply the data dataGrid1.DataSource = bam; dataGrid1.Refresh(); // Close the connection mysqlConnection.Close();
Reply
Answers (
3
)
Constructors and Destructors
C# and ASP