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 295
1 Peter Leow 135
2 Zoltán Zörgő 130
3 Afzaal Ahmad Zeeshan 115
4 DamithSL 100
0 enhzflep 40
1 Richard Deeming 25
2 OriginalGriff 10
3 Anddos 10
4 Kornfeld Eliyahu Peter 10


Advertise | Privacy | Mobile
Web04 | 2.8.150224.1 | Last Updated 10 Jul 2012
Copyright © CodeProject, 1999-2015
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