Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2007-03-15 : 14:10:02
|
Can I Select a dataset as report data source? How to do it? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-03-15 : 14:22:00
|
A dataset uses a data source. A data source is the connection string to the database. A dataset is the query for the report. Do you see how that is different?Tara Kizerhttp://weblogs.sqlteam.com/tarad/ |
|
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2007-03-15 : 14:22:16
|
No, a data source is like a connection, it determines where data comes from, but not which data to get, so it is basically a server name and authentication credentials. You use a data source to create a dataset, which is a saved query of specific data from a data source.The regions in a report therefore get their data from a dataset, which uses a data source to connect and get the data for the report region. |
|
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2007-03-15 : 14:23:08
|
|
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2007-03-15 : 15:43:02
|
Yes, you can do it, but not easily.If you are filling up a dataset in your code through other methods and want to bind a report to it, it can be done, but it isn't trivial and takes some work; I have not done it, just read about it. There's a whole series of articles on MSDN about it:http://msdn2.microsoft.com/en-us/library/aa237582(SQL.80).aspxA dataset actually has no direct relation to a database connection; the bridge is a data adapter which can take data from a database connection and fill up a dataset with it. You can fill up a DataSet using lots of different methods, many of which do not involve database connections at all (i.e., from XML, text files, manual inserts and updates within individual dataTables, etc).The concept of a DataSource is very generic; it does not specifically have to be a database connection, and in fact, it often isn't; more likely it actually *is* a DataSet or DataTable or DataReader or some other object that supports enumeration and all that fun stuff. - Jeffhttp://weblogs.sqlteam.com/JeffS |
|
|
|
|
|
|
|