Can’t open SQL .MDF file because it’s version 852 - c#

I’ve created a C# application and have published it. I tested the published application on my own computer and everything was working properly. When I installed the app on my client’s computer that has the same SQL Server version installed as mine, when I want to open the app, I get this error:
Can’t use or open database because it’s version 852
and this machine supports 706 or earlier.
I’ve installed SSMS, SQL Server Express, a higher version (2017) of SQL Server, but none of the above helped. I’m frustrated, what can I do?
My App.Config file is like this:
Data Source=(LocalDB)\MSSQLLOCALDB;AttachDbFileName=|DataDirectory|\SLApp.mdf;Integrated Security=True;
Everything works fine on my computer with the config mentioned above. Now what can I do?

Related

Deploying a C# application using LocalDB database

When I run my C# application on another PC, a network-related error appears. On my PC, it runs fine. I have used AttachDbFilename=|DataDirectory| to specify the location of my .mdf files. Now, what am I missing in this deployment that makes the application not to run on other PCs?
You are missing an SQL Server instance on your client machines,one option is to install LocalDB on them. Find the installation file SqlLocalDB.MSI, suitable for OS versions on your client machines, you may try this latest version https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SqlLocalDB.msi

How do I get local database work on my client’s PC

I’ve built an application with a local .mdf database, and I’ve deployed the app. I tested it on my PC; there were no problems. The application works perfectly. Today, I installed the app on a client’s PC, and I got this error:
Although all the files are in place and SQL Server 2016 installed on my client’s PC.
I can think of two reasons:
You either used a fixed source path like:
c:\MyProgram\database.mdf
So if you move the database somewhere else other than that folder, simply it won't work because it won't be able to find Database file.
Solution: use a dynamic location, so no matter where the app is installed, it should find your DB.
the installed SQL Server is not the same version or higher as your DB, or not installed properly.
Solution: reinstall or repair SQL Server.

C# with MSSQL database Project Not running in another computers

I have Developed a C# project using Visual Studio 2015 and in this project, I have used the Microsoft SQL Server 2017 Database System.
The Problem is When I tried to run my project's Setup in other computer it shows the following Message whenever I run the project after the installation in another computer.
I have tried installing the MS SQL server in other computer it is displaying the same message. What I have done wrong?? Please help me. How to run my project in any computer?
You are not connected to SQL server yet. Make sure that the SQL services are running correctly. You can check them by clicking on My Computer->Manage->Services And Applications->Services.

Oracle EXE application runs on developer PC but not on other users' PCs. Why?

I am developing a Windows application that connects to Oracle DB.
The machine I am developing the application on has Oracle 6i installed with SQLPlus and Toad to access Oracle by command or graphical interface.
The same set up is true across all other computers in my work place.
The only difference is that my pc has Visual Studio and Oracle 10g ODP.Net libraries to make the development of Oracle Application possible using Visual Studio.
I made sure to include Oracle.DataAccess.dll file along with the EXE in the same path to reduce dependency on default paths/ etc.
The finished EXE file runs as expected on my computer, but whenever I publish it to the other computers, I get the following error message:
The type intializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception.
I tried to change the version of Oracle.DataAccess.dll from 2.111.6.20 to 10.2.0.100.
Again, it ran perfectly on my PC but gave the following exception on other PCs:
Unable to load DLL 'OraOps10.dll': the specified module could not be found.
I copied the said file above from my pc and included it in the published folder of the EXE but the same error message appeared, as if it invisible to the .Net application.
All computers have Windows 7 and all of them are 32bit.
Is there a way to make the application connect to Oracle regardless of the libraries or Oracle version installed locally on the computer? (The same way Toad works whether it detects Oracle 6i or 10g installed)?
I can't install the Oracle 10g ODP.Net libraries on all computers.

Installing MS SQL 2005 drivers for IIS 7.5 .NET apps

I don't normally do .NET development but I have a small .NET app that I need to set up on a new Win2K8 IIS 7.5 server, the SQL 2005 server is on a different box. I've tested the .NET app on an Win7 IIS 7/SQL 2005 machine and it works fine. When I run the app on the new server I get the following error:
The 'SQLNCLI11' provider is not registered on the local machine.
I googled the error and found out that I needed to install the native client drivers. I found the sqlncli.msi file on the database server and installed it on the IIS server. Same problem.
I then installed the SQL Management Studio thinking that might have some drivers that it needed. Same error. I can connect through the management studio but the .NET app keeps giving me the same error.
Any suggestions?
Thank!
I changed the provider in my connection string from SQLNCLI11 to SQLNCLI10.
Works like a charm.

Categories