Unable to open SQL CE 4 databases in VS 2010 SP1 - visual-studio-2010

According to "The Gu", in VS 2010 SP1 (http://weblogs.asp.net/scottgu/archive/2011/01/11/vs-2010-sp1-and-sql-ce.aspx) I should be able to open SQL CE 4 databases.
However, when I try to do this I get the following error:
"The data provider required to connect
to the local data file could not be
found. The file be added to the
project by the typed DataSet
associated with the file will not be
generated"
followed by the error:
"The operation could not be completed"
Note that this is for an ASP.NET MVC Project.

There are some limitations in the SQL Compact 4 provider tooling, described here (under Scenarios not enabled by SQL Server Compact 4.0) - http://blogs.msdn.com/b/sqlservercompact/archive/2011/01/12/microsoft-sql-server-compact-4-0-is-available-for-download.aspx
In addition to the service pack, you must install the SQL Server Compact 4 tools on top - http://erikej.blogspot.com/2010/12/visual-studio-tools-for-sql-server.html

My "solution" was just to open the database in web matrix to alter the schema.
Perhaps this was just an issue with the beta of VS 2010 SP1.

Related

SSIS Error - Parsing Query from SQL Task Fails Due to 80040153, Invalid Value for Registry

Problem Statement
I have a lot of SQL Server environments locally.
When trying to parse a SQL task with very basic truncate table dbo.table syntax, I get the following error message.
I should note that when I execute the task it works fine despite throwing an error when parsed.
My understanding is that it's related to a corrupt .ddl file at the 'Microsoft SQL Server/1XX/DTS/Binn/'
- having trouble determining which SQL Server version's components be the cause.
Is there a way of determining the corrupt .dll and reconciling this issue?
Error Message
------------------------------
Retrieving the COM class factory for component with CLSID {dummy123-dum1-dum2-dum3-dummyds2309}
failed due to the following error: 80040153 Invalid value for registry
(Exception from HRESULT: 0x80040153 (REGDB_E_INVALIDVALUE)).
What I've Tried
Tested on Visual Studio 2017/2019
Figuring out What Com Object is the Problem
Because the message only gives me the CLSID I'm having trouble locating the actual com object it's referencing.
I've run reg query HKCR\CLSID /s /f "{<CLSID>}"
This confirmed that it isn't there, but that wasn't helpful.
Environment
Microsoft Visual Studio Enterprise 2019 Version 16.4.1 VisualStudio.16.Release/16.4.1+29609.76 Microsoft .NET Framework Version 4.8.03752 Installed Version: Enterprise
SQL Server Data Tools 16.0.61912.09160 Microsoft SQL Server Data
Tools
SQL Server Integration Services 15.0.1900.80 Microsoft SQL Server
Integration Services Designer Version 15.0.1900.80
SsmsVsIntegration 1.0 Visual Studio Container Tools Extensions
(Preview) 1.0 View, manage, and diagnose containers within Visual
Studio.

ODT with Visual Studio (Oracle 11G)

I began with Visual Studio 2010 and installed the ODT 11G. This worked completely fine and allowed me to open Oracle projects (.oradbproj).
I ran into another problem while working on Visual Studio 2015. I thought my problem would be fixed by installing ODT 12. This installed fine, however, I realised after that this was unnecessary.
When I came to open VS 2010 and open my Oracle project, I get the error:
"The selected file cannot be opened. 'XXX.oradbproj' cannot be opened
because its project type (.oradbproj) is not supported by this version
of the application. To open it, please use a version that supports
this type of project."
I then uninstalled both instances of ODT (11.2 and 12) and proceeded to install 11g. When I opened VS2010 afterwards, I was greeted with the following error:
"The 'Oracle Developer Tools for Visual Studio .NET' package did not
load correctly. The problem may have been caused by a configuration
change or by the installation of another extension. You can get more
information by running the application together with the /log
parameter on the command line and then examining the following
file..."
When I examine this file I get quite a few ERRORS ranging from:
Access is denied and could not load types: Shims.1_0_0_0.dll &
Shims.2_0.dll
-
OracleVSGPkg.SetSite - Exception Oracle Developer Tools VS Package
SetSite Oracle.DataAccess The type initializer for
'Oracle.DataAccess.Client.OracleCommand' threw an exception. at
Oracle.DataAccess.Client.OracleCommand..ctor() at
Oracle.VsDevTools.OracleUILGlobal.Initialize(OracleVSGPkg vsgPkg) at
Oracle.VsDevTools.OracleVSGPkg.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider
psp) Additonal Information - Oracle.DataAccess Unable to load DLL
'OraOps12.dll': The specified module could not be found. (Exception
from HRESULT: 0x8007007E) at
Oracle.DataAccess.Client.OpsInit.CheckVersionCompatibility(String
version) at Oracle.DataAccess.Client.OracleInit.Initialize() at
Oracle.DataAccess.Client.OracleCommand..cctor()
-
SetSite failed for package [Oracle Developer Tools for Visual Studio
.NET]
-
End package load [Oracle Developer Tools for Visual Studio .NET]
-
OracleVSGPkg.SetSite - Exception Oracle Developer Tools VS Package
SetSite Oracle.DataAccess The type initializer for
'Oracle.DataAccess.Client.OracleCommand' threw an exception. at
Oracle.DataAccess.Client.OracleCommand..ctor() at
Oracle.VsDevTools.OracleUILGlobal.Initialize(OracleVSGPkg vsgPkg) at
-
Oracle.VsDevTools.OracleVSGPkg.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider
psp) Additonal Information - Oracle.DataAccess Unable to load DLL
'OraOps12.dll': The specified module could not be found. (Exception
from HRESULT: 0x8007007E) at
Oracle.DataAccess.Client.OpsInit.CheckVersionCompatibility(String
version) at Oracle.DataAccess.Client.OracleInit.Initialize() at
Oracle.DataAccess.Client.OracleCommand..cctor()
-
SetSite failed for package [Oracle Developer Tools for Visual Studio
.NET]
When I check the "About Microsoft Visual Studio" there is no product "Oracle Developer Tools" listed (there was before) and in my Tools there is an option at the side labelled "Oracle Developer Tools" but when I click on it there are no options, just a single message saying "An error occurred loading this property page."
I've tried endless guides found on this website such as going through my registry, deleting all instances of Oracle and uninstalling all related files, then reinstalling. But that did not work. The rest of the questions seem to be similar, but not the same. All I want is to have Oracle 11.2 installed and all instances of 12 deleted, basically what I had before I installed 12.
I had this problem before and ended up having to revert my PC to factory settings.

Unable to setup Entity Framework to Oracle. Data Source Name dropdown is empty, and trying EZConnect gives exception

I am trying to connect a test application via EF to an Oracle database.
I have Visual Studio 2013, and I've just installed the latest Oracle ODAC (ODAC 12c Release 2 and Oracle Developer Tools for Visual Studio (12.1.0.1.2)). I do the following
Created a test application
Add Entity Framework 6 from nuget (I also tried EF5)
select to add a new ADO.NET Entity Data Model
select EF Designer from database
click New Connection
It is at this point that the "Data Source Name" dropdown is empty:
It says that it's looking for the tnsnames.ora file located in the path:
c:\oracle12\product\12.1.0\client_2\network\admin\tnsnames.ora
And I DO have a tnsnames.ora file there with 3 aliases defined. If I pick "Search" and select that same file, those 3 names show up under "Aliases"
Some suggested changing the Connection Type to EZ Connect and manually putting in the connection info. When I do that and try to continue or select Test Connection I get "The type initializer for 'OracleInternal.Network.AddressResolution' threw an exception."
I'm at a loss at this point :(
use the unmanaged version of the driver. that solved my problem

visual studio 2010 using SQLCe 3.5 but project has 4.4 sdf file

I have added sql compack edition v4.0 file on my windows phone 7 project in visual studio 2010. I copied the data base from application folder to isolated storage, now while querying it gives this thing
countyList.Count()
A first chance exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in Microsoft.Phone.Data.Internal.dll
'countyList.Count()' threw an exception of type 'System.Data.SqlServerCe.SqlCeException'
base {System.Data.Common.DbException}: {"Incompatible Database Version. If this was a compatible file, run repair. For other cases refer to documentation. [ Db version = 4000000,Requested version = 3505053,File name = AMEDatabase.sdf ]"}
_customMessage: "Incompatible Database Version. If this was a compatible file, run repair. For other cases refer to documentation. [ Db version = 4000000,Requested version = 3505053,File name = AMEDatabase.sdf ]"
_errors: {System.Data.SqlServerCe.SqlCeErrorCollection}
Errors: {System.Data.SqlServerCe.SqlCeErrorCollection}
HResult: -2147467259
Message: "Incompatible Database Version. If this was a compatible file, run repair. For other cases refer to documentation. [ Db version = 4000000,Requested version = 3505053,File name = AMEDatabase.sdf ]"
NativeError: 28609
Source: "SQL Server Compact ADO.NET Data Provider"
when i added this file from my visual studio how this thing can use 3.5 version??
what to do? could it be coz the System.Data.Linq file?(my project has v 2.0 of this dll)
You can only use SQL Servver Compact verision 3.5 databases with Windows Phone
We need some settings to use sql ce v4.0 in VS 2010, hit googles for more info.

SQL Compact 4.0 can't open/read sdf file

I've installed SQL Compact 4.0 CTP 2 via WPI and used NUPack to add SQLCE.EntityFramework in my project.
It compiles and run perfectly but I can't open the SDF file in Visual Studio 2010's Server Explorer.
When I try I always receive the following message:
Microsoft Visual Studio
This is not a valid SQL Server Compact Database file or this file version is not supported by current SQL Server Compact Engine.
OK
I've already tried to uninstall and reinstall everything.
It cannot be opened in SQL Server 2008 R2 Management Studio also.
Please help!!
Installing this (Visual Studio 2010 SP1 Tools for SQL Server Compact 4.0) fixed this exact problem for me perfectly:
http://go.microsoft.com/fwlink/?LinkId=212219
Props to ErikEJ from this thread:
http://forums.asp.net/t/1811963.aspx/1
I met the same problem while trying to follow up the tutorials of MVC3 (MvcMovie) provided by asp.net when I was told to double click the "Movies.sdf" file to check out the tables or other infos.
Acturally the solution is just below the request:
Note If you get an error when you double-click Movies.sdf, make sure
you've installed SQL Server Compact 4.0 (runtime + tools support).
(For links to the software, see the list of prerequisites in part 1 of
this tutorial series.) If you install the release now, you'll have to
close and re-open Visual Web Developer.
After Sql Server Compact 4.0(runtime+tools support) installed, the problem is solved.
This question is a bit old. But I think the answer is that VS2010 SP1 has SQLCE 3.5 and SQLCE 3.5 x64 only, and not SQL Compact 4.0. The SQL products come together with Studio. There is still no SQLCE 4.0 today in 2012 included in distribution of Studio 2010 (I use Express edition).
This version packaging is not direct root cause, but just a clue, that different version will need extra effort.
The fix should involve registration of "Data Provider" in .NET Framework used by Visual Studio.
Look at "DbProviderFactories" inside c:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config. This section describes what data providers can be used by .NET and Studio.
If there is unexpected entries there, try to repair framework or register providers manually. To do so, some low level registration tools will be required. Say for asp.net providers there is aspnet_regsql.exe etc. But for just SQLCE itself there must be something similar.
<system.data>
<DbProviderFactories>
<add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
</DbProviderFactories>
</system.data>
The difference between broken Studio and working App is that both use the same Framework but have different providers in config. (Or app uses other technique to pick a DLL and open SDF)
Answer: Since SP1 it is officially possible to use SQLCE4.0 in Studio 2010 SP1 (Thanks to Nathan Fisher for link http://support.microsoft.com/kb/983509 )

Resources