I am trying my best to get my head around SQL Server but seem to be going around in circles. Everything I google is either way too complicated for my simple means or else I find half a dozen different ways to do the same thing.
Can somebody please point me to a site, an article or a video where, in clear, plain, simple English, it explains the differences and the relationships between a datatable, a dataset, a dataadapter, a datastream & various other options I keep getting presented with ?!?
The sooner I can grasp the concepts and the differences, the sooner I can spend my time actually coding rather than asking questions ;-) !!!
a DataTable is a an object that mirrors a Table in SQL Server. it can have primary key, unique constraints, not null constraints, size constraints, defaults for columns, and even references(ie FK) to other Datatable.Columns. You would populate it with a query, so it is the object you use as a
container for the results of a query...so that query could be capturing the results from a table, query or view.
a dataSet is a container which can have zero to many DataTables. The image below is a Dataset with six DataTables in it.
A dataAdapter is the .NET object what is used to process the query from the server, and stuff it into the table. it is also used to sned any changes in the DataSet you've made, to propagate those changes back to the SQL Server.
A datastream is what is used when one of the columns in your datatable is binary(image, varbinary for example); it's just handling the results in a special way, is how i would explain it.
you can create a Dataset.xsd in your project, and with the server explorer, drag and drop tables you plan to use in your query. this can help during design time.
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!