Unable to load native components of Sql Server Compact when I try to run my application - asp.net

I have created a setup for c# app. but after installation it shows me following error:
Unable to load native components of SQL Server compact corresponding to the ADO.NET
provider of the version 8080.
Install the correct version of SQL server compact.
Do I need to include SQL Server Compact in my application setup?

Build 8080 is version 3.5. not 4.0. You are referencing the wrong version.

please install sql server compact edition.
download from : http://www.microsoft.com/en-us/download/details.aspx?id=17876
then restart your application, then it should be work.

Related

Why is no database shown in Visual Studio?

My SQL Server Object Explorer is not showing any databases:
I also get an error A network-related or instance-specific error occurred while establishing a connection to SQL Server. .... When I run the website, the error being shown is The system cannot find the file specified. Furthermore, SQL Server is missing from Services:
(It was installed together with Visual Studio and was never used separately)
Yesterday, everything worked like charm; I had multiple databases with tables and was able to access the data. Today, the same project can't even start, no db's either. What's wrong with Visual Studio here? Thanks
I've had the same problem before. Took me a while to figure it out. What you need to do is go here: https://www.microsoft.com/en-us/download/details.aspx?id=42299
In my case, i'm using SQL Server 2014 Management Studio. You must find the one that suits the version of SQL studio that you're using (2008, 2012, 2014).
Click the big download button and now, it is very important that you choose the proper version. Check:
Express 32BIT\SQLEXPR_x86_ENU.exe if you're running on a 32-bit PC, or
Express 64BIT\SQLEXPR_x64_ENU.exe if you're running on a 64-bit PC
It is very important that you install Express version.
Next, once you install that, you should be able to see the SQL Server (MSSQLSERVER) in your services.msc, along with few other SQL services installed.
Open Visual Studio 2015 and in SQL Server Object Explorer window right click on SQL Server and choose Add SQL Server... option. It should prompt you to connet to the server from SQL Server Management Studio.
If you kept everything by default during the installation, just type . (dot) for the Server name and click connect. Now it should load the database.
It turns out that Visual Studio does not come with MS SQL Server in the default installation. It is necessary to install SQL Server Data Tools from the MS website manually. VS custom installation also allows to do that, but you will need an installer. Just make sure to select SSDT in the custom installation components menu. Additionally, I also ran an update from VS itself that allowed me to install SQL Server 2008, 14, and 16. I am finally able to access DB in VS!

How to include database file and SQL Server Express installer for Deployment with VS2010

I am using Visual Studio 2010 and SQL Server 2008 Express
I would like to deploy my project with setup and deployment project and would like to include the SQL Server database file and SQL Server 2008 Express installer, so the user can easily install and use the application.
Please anyone show me step by step instructions.
Or any link that can help me to solve this out
Thanks
Use prerequisites check box, this will install sql server on client machine

MDF Cannot Connect from Visual Studio

I am getting this error and I have SQL Server 2012 installed anyone know what's wrong? I am trying to attach a database file into my Visual Studio 2010.
The database 'X' cannot be opened because it is version 661. This
server supports version 655 and earlier. A downgrade path is not
supported.
Could not open new database 'X'. CREATE DATABASE is aborted.
An attempt to attach an auto-named database for file X failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
The database file was created and/or attached on a SQL Server instance that was of a newer version than the one you have. If you bring your local instance up-to-date to a newer build, then you should be okay.
More specifically - version 661 is SQL Server 2008 R2. The instance you are attaching (651) to is SQL Server 2008 RTM or SP1. Be sure it is using SQL Server 2012 instance instead of perhaps a local SQL Express instance.
See here:
http://www.sqlskills.com/blogs/paul/sql-server-2008-r2-bumps-the-database-version/
Turns out the problem is with regard to an Express Edition. I cannot use the full version because the mdf file I'm binding requires user instance which is only supported by Express Editions. I downloaded the SQL 2012 Express from this https://www.microsoft.com/betaexperience/pd/SQLEXPWT/enus/default.aspx which allows for LocalDB and all the problems go away.

Entity Framework 5 on Windows Server Web (SP2) x64 and IIS7.0

I have a test website running on a test server with Windows Server Web (SP2) installed. I've just installed .NET4.5 on it. In the website (simple ASP.NET webforms from template) I've used Entity Framework 5 Spatial types, very simple code just for testing which runs fine on my local dev machine:
var conn = new DbEntities();
var geo = conn.tbl_SpatialData.First().GeoInfo;
var geom = DbGeometry.FromGml(geo.AsGml());
litText.Text = geom.AsGml();
However on the server it gives me this error:
Spatial types and functions are not available for this provider because the assembly 'Microsoft.SqlServer.Types' version 10 or higher could not be found.
The sql database where it wants to connect is on a different server, and is a SQL Server 2008 -> I am connecting to the same db from my local dev machine.
I've already tried searching for the dll on my local machine, and adding it to the website's bin folder, however it gives me a new error requesting for another dll. I would like to have those dlls installed globally like on my dev machine. What am I missing or should I install on the server?
Thanks in advance!
That assembly and its dependencies are part of SQL Server Managements Objects. This feature must be installed on the server. It should be part of SQL Server's Client Tools or Client Tools SDK.
This might help you when this comes in published server
http://blogs.msdn.com/b/adonet/archive/2013/12/09/microsoft-sqlserver-types-nuget-package-spatial-on-azure.aspx
If you have control over the server you can just install the CLR Types
for SQL Server. The SQL Server 2012 SP1 version of the CLR Types can
be downloaded here. SQLSysClrTypes.msi is the installer you want and
there is an x86 (32 bit) and x64 (64 bit) version depending on the
architecture of the machine you are deploying to.
However, installing extra software on the target machine is not always
an option – especially if you are deploying to a machine you don’t own
(such as Windows Azure Web Sites). Fortunately the required assemblies
can be deployed along with your application.
Step 1: Install the Microsoft.SqlServer.Types NuGet package.
PM> Install-Package Microsoft.SqlServer.Types
Step 2: Ensure the appropriate version of the native
SqlServerSpatial110.dll assembly is copied to the output directory
and deployed with your application.
Steps on how to do this are included in a ReadMe.txt file that will
open in Visual Studio when you install the package.

Unable to connect the Oracle server on 64 bit machine through ASP.NET on 64 bit machine

I am new to Oracle..and i am working on a ASP.NET Application whose backend is Oracle 11g.
I have 2 Machines for development. One is the Database Server(Windows Server 2008 R2) and second is the Application server(Windows 7).
I have installed a Oracle server 11g standard edition on Database server machine.
I have installed the Visual Studio 2010 and oracle 11g client on the Application server.
Now i am able to connect the oracle database server through the Application server using Toad.
But when i try to connect the database server through the ASP.NET 4.0 Application, then i am unable to connect the oracle and get the following error...
Attempt to load Oracle client libraries threw BadImageFormatException.
This problem will occur when running in 64 bit mode with the 32 bit
Oracle client components installed.
I have tried to set the Target Platform to x64 , but still it didnt work...
Any Help/Suggestions will be appreciated....
Thanks in Advance.....
The issue seems to be exactly what it says. Looks like the Oracle Client you have installed is a 32-bit Oracle client. Download and install the 64-bit version of Oracle client.

Resources