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
Memento
NA
111
133.5k
c# winforms - binding DataGridView to sdf database
May 28 2012 12:59 PM
I create a small sdf database and put it into project folder.
Trying to bind a DataGridView with that database, I wrote:
using System.Data.SqlClient;
. . .
Form1_Load:
string connString = "Provider=.NET Framework Data Provider for Microsoft SQL Server Compact 3.5;Data Source=|DataDirectory|\db01.sdf";
string query = "SELECT * FROM table01";
SqlDataAdapter dA = new SqlDataAdapter(query, connString);
SqlCommandBuilder cBuilder = new SqlCommandBuilder(dA);
DataTable dT = new DataTable();
dA.Fill(dT);
BindingSource bS = new BindingSource();
bS.DataSource = dT;
dgv01.DataSource = bS;
Error: Keyword not supported: 'provider'.
Could someone explain, what is wrong, please.
Reply
Answers (
5
)
Which language we used in WebServices?
Combobox default item