Microsoft SQL Server compatibility issue (C# Application) - c#

I am developing a C# application on Windows 10, under Visual Studio 2015.
I can see that I have installed on that PC Microsoft SQL Server 2005 Compact Edition, 2012 Native Client, 2014 Express LocalDB, 2016 Local DB and other stuff like this.
I did not voluntarily installed any of this, they must have been with MVS 2015 or with the Windows.
The app that I made throws an exception on a Windows 7 PC with Microsoft SQL Server Compact 4.0 SP1 and all the Microsoft SQL Server 2014 specific stuff (including Express LocalDB).
If I run sqllocaldb i command on Win10 PC I have only mssqllocaldb connection with 13.0.1601.5 version number.
On Win7 PC I have the same status except that the version is 12.0.2000.8.
When I run my application I get
This server supports version 782 and earlier, your version is 852.
What can I do so that I can run the app in both computers since I have SQL Server 2014 on both of them fully installed?

Related

SQL Server FORMAT() not working with 'iv' as culture [duplicate]

I am using SQL Server 2017 and try to use culture in the Format function. When running this Query on the server the result is incorrect:
SELECT ##VERSION --> Microsoft SQL Server 2017 (RTM-CU17) (KB4515579) - 14.0.3238.1 (X64) Sep 13 2019 15:49:57 Copyright (C) 2017 Microsoft Corporation Enterprise Edition (64-bit) on Windows Server 2012 R2 Standard 6.3 <X64
SELECT FORMAT(SYSDATETIME(), N'Y', 'fa'); --> February 2020
But when running this in another server with SQL server 2017 the script works fine:
SELECT ##VERSION --> Microsoft SQL Server 2017 (RTM-CU3-GDR) (KB4052987) - 14.0.3015.40 (X64) Dec 22 2017 16:13:22 Copyright (C) 2017 Microsoft Corporation Enterprise Edition (64-bit) on Windows 10 Enterprise 10.0 <X64> (Build 16299: )
SELECT FORMAT(SYSDATETIME(), N'Y', 'fa'); --> بهمن, 1398
What has configuration must be checked?
P.S: I realized that this problem occurres on Windows Server 2012 R2 and lower versions.
Finally, I found the problem. This feature depends on the version of Windows which SQL server installed on it. Persian calendar was added in Windows Server 2012 R2 And Windows 10.
This image shows the date format for fa culture in Windows Server 2012 R2 and Windows 10
And this image shows the date format for fa culture in the older version of Windows
In fact, the problem is at Windows Server where the SQLServer is installed.
For any language you want to use, Windows Server must have this language installed at OS level.
To install in "Windows Server 2012 R2" or later, just follow these steps:
Search for "Control Panel" and open it
Select "View by: Large Icons"
Click on "Languages"
Add the Language you need, and after that also install the "Language Pack" for the new language added.
After this, your parameter in FORMAT function will be accepted.

Installing MSSQL for Windows 7 and running application made with MSSQL2016 for X86 systems

I'm developing an ERP via Windows Form Application using (C# and SQL) through Visual Studio 2017 and MSSQL SERVER 2016 (VERSION 852) on a 64 bit Machine with Windows 8.
On deploying the application on the X64 machine with SQLLOCALDB (VERSION 852 or above) installed, the application is working fine.
But, I want to distribute the application in my circles having old machines with X86 (32 bit) architecture. The application is getting installed, but on launching the application, the form with DATABASE CONNECTIVITY is creating a problem.
"The database 'MyFirstWFAAPP' cannot be opened because it is version
852. This server supports version 851 and earlier. A downgrade path is not supported. Could not open new database 'MyFirstWFAAPP'. CREATE
DATABASE is aborted. Cannot attach the file
'C:\devx\2018\MyFirstWFAAPP\App_Data\MyFirstWFAAPP.mdf' as database
'MyFirstWFAAPP'. "
PS: Installation of MSSQL SERVER (Local DB) to 32 bit machines, WINDOW 7, has been deprecated by Microsoft (As I've been informed) So, MSSQL SERVER 2016 and above cannot be installed onto Window 7 systems.
Window 7, XP Support SQL SERVER installation either or below SQL SERVER 2008 R2 (VERSION 660/661).
I'm in a dilemma, as I'm have no idea of what to do.
1) Is there any way, we can convert Code of SQL SERVER 2016 to SQL SERVER 2008 (R2) or below??
2) or, should I delete the MSSQL Server 2016 and then install the 2008 editions.
3) or, should I install SQL 2008 on the parallel with SQL SERVER 2016 running. and, also install MSSQL Server Management Studio and choose the targeted versions of MSSQL. (I'm not sure, whether it's possible. Just guessing).
Please support. As, I'm worried.
Thanks and Regards!
Narayan
This has nothing to do with the target platform (x86 vs. x64). This is simply an issue of targeted SQL Server version. SQL Server knows how to upgrade a database file, but there is absolutely no way it can downgrade one. You are distributing a SQL Server 2016 database file (internal version 852), this will only be opened by the SQL Server 2016 or SQL Server 2017.
But the real problem is different. The real problem is that you are distributing the database as an artifact. This is an absolute NO. Just think how will you distribute the next version of your app, your MDF will replace the actual data that was updated by your 'circles'. You must change your application to distribute only scripts for creating and upgrating database. Your framework of choice may well already provide a solution.

Is Microsoft.Interop.Security.Azroles in Windows Server 2016

The Authorization Manager (azman.msc) was deprecated for Windows Server 2012 R2, and it looks as though it might not be in Windows Server 2016.
But I can't find any information regarding Microsoft.Interop.Security.Azroles in Windows Server 2016. Where could I find information about this?
I installed Windows Server 2016 and just installed an application that comes with the Microsoft.Interop.Security.Azroles - library bundled. It worked fine.
azman.msc also still exists in Windows Server 2016.

Connecting to Oracle 64 Bit 12c Release 12.1.0.2.0 through a C# Program Visual Studio 2010 Express Edition

I am attempting to connect to an Oracle 64 Bit Release 12.1.0.2.0 Database from a c# Program created in Visual Studio 2010 Express Edition (32 Bit) Running on Windows 7 Professional OS (32 Bit). The connection fails. At the same time, I can connect to this Oracle Database Server through SQLPLUS with the same credentials. I could use some help in identifying the proper ADO.NET provider for this scenario. I have attempted this with both the Oracle.ManageddataAccess.dll and Oracle.DataAccess.dll

VS 2012 express Edition, windows phone 8, database

i have to develop a windows phone 8 application with a local database, i would like to know if we can create a local database with SQLite or SQL Server Compact Edition in vs 2012 express edition, i ve installed this version but i can not find the server explorer !!!
try using SQL Server Compact Toolbox

Categories