QA


Q&A

Q.

If I want to connect to a data source other than Jet, how do I know what connection string to use?

A.

Not only is different connection information available for different types of data sources but also for different versions of different data sources. The best way of determining the connection string is to consult the documentation for the data source to which you want to attach.

Q.

What if I don't know where the database will be at runtime?

A.

For file-based data sources such as Jet, you can add an Open File Dialog control to the form and let the user browse and select the database. Then concatenate the filename with the rest of the connection information (such as the provider string).




Sams Teach Yourself Microsoft Visual C# 2005 in 24 Hours, Complete Starter Kit
Sams Teach Yourself Visual C# 2005 in 24 Hours, Complete Starter Kit
ISBN: 0672327406
EAN: 2147483647
Year: N/A
Pages: 248
Authors: James Foxall

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net