It definitely helps me to understand about OpenDataSource. I'm working on a project to see how to create sample SQL databases (32bit/64bit SQL Server 2005/2008 including Express Edition) for a .NET application. I'm trying to figure out the following items:
1. How to create the databases?
e.g.
- using sql scripts
- backup/restore
- detach/attach
2. Where to store the sample data?
e.g.
- xml
- mdb
- text files
- csv
- backup
- detached files
3. How to import the data?
e.g.
BCP
BULK INSERT
Import/Export Wizard
SSIS
OPENROWSET
OPENDATASOURCE
OPENQUERY
SqlBulkCopy
Backup/Restore
Detach/Attach
What are the pros and cons (especially what datatype cannot be imported) in each option? What data source should I create (e.g. text file, XML, Access database(MDB), Excel file (CVS)) if portability is a must? Ideally, the data importing can be initialized from a .NET 3.0/3.5 application instead of thru SSMS or command prompt.