Click here to Skip to main content
15,908,768 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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.


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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900