Unknown Error. Possibly SQL Server Compact is not correctly installed.

# Unknown Error. Possibly SQL Server Compact is not correctly installed.

• Monday, August 13, 2012 7:20 PM

This is a similar issue to the one discussed in the thread here.  Basically I am unable to connect to a SQL Server Compact database from Visual Studio 2010 Ultimate.  I have tried all of the steps discussed in the previous thread and posted there with no response.

I have tried uninstalling Visual Studio 2010 Ultimate using the Visual Studio uninstallation utility (VS2010_Uninstall-RTM.ENU.exe /full /netfx) and reinstalling, but this does not fix the issue.  I would like to avoid having to install a new version of Windows 7 on my machine if at all possible.

The issue seems to have started around the time I began using the Microsoft Sync Framework 2.1.

Any suggestions would be greatly appreciated!

-Stuart

Stuart Summers

• Moved by Tuesday, August 28, 2012 3:47 AM SQL CE question (From:Installing and Registering Visual Studio Express Editions)
•

### All Replies

• Wednesday, August 15, 2012 5:33 AM

Hi Stuart,

Could you please provide us more details? I recommend you share your steps here so that we may reproduce this issue.

You can use this tool to record your steps http://msdn.microsoft.com/en-us/library/windows/desktop/dd371782(v=vs.85).aspx

What's more, have your installed any SQL products except Visual Studio?

I see that you have use " Visual Studio uninstallation utility", have you got any error when you try to install VS again?

After that, you can upload your vslogs.cab from %tem% folder to SkyDrive and share the link to me.

Best regards,

Barry Wang [MSFT]
MSDN Community Support | Feedback to us

• Wednesday, August 15, 2012 2:15 PM

Barry,

Unfortunately I am under time constraints and do not have time to redo all of the installation/uninstallation steps.  When time permits I will use the installation logging procedure you suggested.  I do, however, have a few logs from reinstalling the SQL Server Compact 3.5 SP2 32 and 64 bit, and reinstalling the SQL Server Compact Visual Studio Tools (SSCEVSTools).  Everything seems to install perfectly except for a couple of lines in the SSCEVSTools:

VSTools_PrereleaseVersion = Setup has detected that pre-release version of Microsoft SQL Server Compact Design Tools is already installed on your computer. Uninstall the pre-release version and run the Setup again.

and

VSToolsNewVersionFound = A later version of Microsoft SQL Server Compact Design Tools is already installed.

I can't find an already-installed instance of the SSCEVSTools on my computer, so I don't know where the installer is getting this.  Apart from these warnings/errors, the installation proceeds without issue.

I am able to begin loading a SQLCE database via the Server Explorer in Visual Studio, but when I click either "Test Connection" or "OK" to open the database, I get the error:

Unknown error. Possibly SQL Server Compact is not correctly installed.

One other thing is that I am able to connect to a SQLCE database from ADO.net in C# using a connection string with the SqlCeConnection object.  I can only do this if I manually reference the Private version of the System.Data.SqlServerCe library.  The .NET reference and the Desktop version of the library will cause the following error:

The application is trying to load native components of version 8080 that are incompatible with ADO.NET provider of version 8087. Incompatible versions can lead to application instability and hence loading of SQL Server Compact has been aborted. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.

Hopefully that gives a little bit more detail concerning my issues.

Thanks in advance for any help with this!

-Stuart

Stuart Summers

• Thursday, August 16, 2012 8:49 AM

Hi Stuart,

If so, I recommend you refer to this blog http://blogs.msdn.com/b/heaths/archive/2009/05/20/collect.aspx.

Use the "collect" tool to gather some logs. After running that tool, you will find "vslogs.cab" under %temp% folder.

Please upload it to SkyDrive or send it to me via v-barryw@microsoft.com.

It contains a msiinv.txt log which will help me to know if you have any higher version of SSCEVSTools.

It also contains SSCEVSTools.logs for me to know what is the core error when installing. I cannot read some of your error messages and the collect step will no cost so much time.

I looked into my email and find your error message

"VSTools_PrereleaseVersion = Setup has detected that pre-release version of Microsoft SQL Server Compact Design Tools is already installed on your computer. Uninstall the pre-release version and run the Setup again"

Please refer to msiinv log to find out the product key of the beta version.

After that, try to uninstall it with the following command:

msiexec /x {product key you found} /L*vx "%TEMP%\beta_version.log" /qb

Thanks,

Barry Wang [MSFT]
MSDN Community Support | Feedback to us

• Monday, August 20, 2012 2:46 AM

Hi Stuart,

I have got the logs.

When you tried to remove Visual Studio 2010, you haven't removed Visual Studio 2010 Sp1 first.

From your logs, the SP1 installed on 2011.09.30 was never removed.

What's more, "Visual Studio 2010 Tools for SQL Server Compact 3.5 SP2 ENU version 4.0.8080.0" was installed on your OS. I did find more packages.

So please try the following steps to fix:

1. Tried to repair Visual Studio from control panel

2. If failed remove VS Sp1>> Use the Visual Studio uninstallation utility >> Reinstall Visual Studio

If you have any updates, please feel free to let me know.

Thanks,

Barry Wang [MSFT]
MSDN Community Support | Feedback to us

• Wednesday, August 22, 2012 4:56 PM

Hi Barry,

I tried responding to your email, but it said your email was restricted.

I have tried the steps you suggested.  First I tried repairing the Visual Studio 2010 installation with no success.  I then tried to uninstall VS2010 SP1 first before using the uninstall utility with /full /netfx and then reinstalling VS2010.  Neither of these steps worked.  I still have the same error when I tried to connect.

In fact, instead of fixing the issue, uninstalling in this fashion seemed to introduce more errors.  I now have to run the Private version of the SQL Server Compact reference when I'm running locally.  When I create installers to use on other machines, I have to use the Desktop version of the SQL Server Compact reference.  The default reference for SQL Server Compact does not work on my machine or on a remote machine.

It takes time to uninstall and reinstall Visual Studio.  I am losing productivity and am very frustrated that VS2010 has caused so many issues.

Thank you for helping with this issue.  If you have any other ideas, I'd love to hear them.

-Stuart

Stuart Summers

• Thursday, August 23, 2012 9:02 AM

Hi Stuart,

In that case, could you please upload the full logs to https://skydrive.live.com/ . Then when you right click the file your will get a "Share option". Share your link so that I can analyse your logs.

Thanks,

Barry Wang [MSFT]
MSDN Community Support | Feedback to us

• Thursday, August 23, 2012 3:13 PM

Hi Barry,

I uploaded the file to skydrive.live.com as you suggested.  Let me know if you find anything else.

Thank you again for assisting with this issue.

-Stuart

Stuart Summers

• Friday, August 24, 2012 1:51 AM

Hi Stuart,

Could you please copy the "Shared link" and paste it here? Otherwise I have no way to access your file.

Thanks,

Barry Wang [MSFT]
MSDN Community Support | Feedback to us

• Friday, August 24, 2012 1:35 PM

Hi Barry,

Here is the link to my vslogs.cab file:

https://skydrive.live.com/redir?resid=B35229594B70424C!107&authkey=!APAKdIvuQSJ-Y8g

Let me know if you find anything or if I can provide anything else that will help solve the issue I am having.

Thanks again,
Stuart

Stuart Summers

• Tuesday, August 28, 2012 3:47 AM

Stuart,

The log indicates the installation completes without a problem. I'm moving the threads to dedicated SQL Server compact edition forum.

At the same time, you may try the solutions in this thread and see if it helps:

thanks.

Forrest Guo | MSDN Community Support | Feedback to manager

• Wednesday, August 29, 2012 1:51 PM

Thank you for the reply Forrest.

While the solution in the thread you posted does allow me to open a SQL Server Compact database programmatically, it requires that I switch from Private (only way to get it to work on my local machine) to Desktop (only way to get it to work on a clients machine) when I make a release.  It also does not fix my issue of not being able to connect via Visual Studio Server Explorer.

Thanks,

Stuart

Stuart Summers