Solved

Not able to add SQL Server Compact 4.0 table to dataset

Posted on 2011-10-01
4
1,297 Views
Last Modified: 2013-11-17
I have a vb.net project in Visual Studio 2010 SP1 that uses SQL server compact 4.0 database. I recently upgraded the database from SQL server compact 3.5 to version 4.0. I changed the target framework to 4.0 in the project properties. Now when I try to drag a table from the database in Server Explorer to the dataset I get the following error:

 "The version of Microsoft SQL Server Compact database that you selected is not supported by the current project. The database and the connection will not be added to the project.".

Other than this the project builds okay and I can run it, but I can't add a table to the dataset.

Also, if I try to add a new Datasource SQL Server Compact 4.0 is not an option in the Data Source list, and in the Data Provider dropdown box the only option is ">NET Framework Data Provider for Microsoft SQL SErver Compact 3.5". There is no option for version 4.0.

Any help would be very much appreciated. Thanks!
0
Comment
Question by:myester
  • 2
  • 2
4 Comments
 
LVL 59

Expert Comment

by:Kevin Cross
Comment Utility
HI. I just had the same experience with version 4. I believe what ultimately fixed it for me was that SP1 for VS2010 had to be reinstalled/repaired. Try that and post back.
0
 

Accepted Solution

by:
myester earned 0 total points
Comment Utility
HI, from what I've been able to learn version 4 is not compatible with Winforms in Visual Studio. It only works with web projects.What type of project are you working with? Thanks!
0
 

Author Closing Comment

by:myester
Comment Utility
SQL Compact Database 4.0 is not compatible with Winforms. It works with web projects.
0
 
LVL 59

Expert Comment

by:Kevin Cross
Comment Utility
Sorry I did not get a notification on your response. I was trying this in a general Library project as I wanted to use with both a WinForm and Web Application, so the DAL was common.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now