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
Lars Persson
NA
110
0
Questions about Dataset, Data adapter and how to show data in a form.
May 20 2012 1:40 PM
I wonder when you should use a data set and Data adapter and when not to.
Do you have to use data adapter if you want to work disconnected from the database? If you use Data adapter, must you also use dataset?
I understand that dataset is a representation of tables in memory and data adapter is somehow a link between a dataset and the database.
I have this code:
string connectionString = "data source = KONTORET\\sqlexpress; Initial Catalog = testDatabas; Trusted_Connection = True";
SqlConnection connection = new SqlConnection(connectionString);
connection.Open();
string selectStatement = "select * from Cars";
SqlCommand command = new SqlCommand(selectStatement, connection);
As I understand it you doesn't need data adapter when you work like this. Do you use a dataset even if you don't say so explicitly?
I would also like to know how to show this in a form.
Reply
Answers (
7
)
how to slove browser error?
PhotoShop with Use in .Net