Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: dataset
Can someone give me some advice on how to create a SQL Compact Database file that is used by both an application and DLL in the same solution.
 
I can create the database in the application and use it. The problem is using it in the DLL. I created a new DataSet in the DLL using the same DataSouce but only selecting one or two of the tables. However, when the app runs it does not use the same database file. Changing the DLL config file to use the same file wipes the database of all data.
 
To use the same database file in the form in the DLL I have to pass the connection string in the constructor and set the ConnectionString for each table adapter. Is there any way around this?
 
I am probably misunderstanding how table adapters and DataSets work so would be grateful for any pointers others may be able to give.
 
Thanks in advance.
 
Kevin
Posted 9-Jul-12 23:22pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 210
2 BillWoodruff 195
3 DamithSL 195
4 Richard MacCutchan 178
0 OriginalGriff 5,130
1 DamithSL 4,157
2 Maciej Los 3,670
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,821


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 10 Jul 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100