Click here to Skip to main content
12,701,854 members (35,925 online)
Rate this:
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.

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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170118.1 | Last Updated 10 Jul 2012
Copyright © CodeProject, 1999-2017
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