My goal is to create a stand-alone C# Windows form application with 2-3 tables that will be installed on client machine with a installer file. And I don't want to install SQL Server 2008 software on client machine, I'm using Visual Studio 2013 C# for development.
My options are SQL Server Compct 4.0 but I don't see Visual Studio 2013 has inbuilt support for that, when I add new item to project I don't see Compact (.sdf) file option there.
I've installed third-party SQL Server Compact Toolbox so I can create .sdf file and connectivity but I believe Microsoft is not giving support for compact db now.
I can see service-based database (.mdf) file which is actually a LocalDb\\ something.
So what should I use if I don't want to install SQL Server 2008 on client but want to have db
at client software?
You should mostly base your choice on your target platforms and the level of SQL Server functionality you expect.
Target Platforms:
LocalDB does not support older versions of Windows (e.g. Windows XP) or WoW. Toad World's LocalDB overview has a good breakdown of its target-platform restrictions.
SQL Server Compact Edition has very few target-platform restrictions. Check out its download page under "System Requirements" for specifics.
Functionality:
LocalDB better approximates SQL Server Express functionally. SQL Server Compact Edition has many functional limitations (e.g. no support for stored procedures).
MSDN's introductory overview of LocalDB explains many of the important functional differences between LocalDB and SQL Server Compact Edition; and the aforementioned Toad World LocalDB overview explains some of what (not) to expect from LocalDB functionally too.
Redistribution:
Both SQL Server Compact Edition (per the "Additional Information" section of its download page) and LocalDB (per SQL Server forums) are freely redistributable: so you should be okay with either with respect to fine print.
maybe SQLite would be an option? check out: http://www.sqlite.org/
it's just a DLL/Assembly you need to reference and it's pretty straightforward..
Related
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.
I'd like to ask you about the simplest way how to have a small database with my application in c#, without using a server. Im using Visual Studio 2013 Professional and I used to work with Local Database and Ado.Net data entity model, but I can't see it here anymore.
Thank you guys
You can use LocalDB.
LocalDB is created specifically for developers. It is very easy to
install and requires no management, yet it offers the same T-SQL
language, programming surface and client-side providers as the regular
SQL Server Express. In effect the developers that target SQL Server no
longer have to install and manage a full instance of SQL Server
Express on their laptops and other development machines. Moreover, if
the simplicity (and limitations) of LocalDB fit the needs of the
target application environment, developers can continue using it in
production, as LocalDB makes a pretty good embedded database too.
Here's a walkthrough: https://msdn.microsoft.com/en-us/library/ms233763.aspx
i was trying the MVC Music Store project but i encountered a problem when going to the administration tool, it says
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: Unable to connect to SQL Server database.
I searched online and tried numerous ways and found out it is because i don't have sqlserver express edition, so i can't use the AttachDbfile feature to auto create aspnetdb.msd file to store administration data
as i stated in the title, the truth is i installed sql server 2012 express first, but because i need reporting services i then installed the full sqlserver 2012, but i didn't create a new instance when installing instead i selected adding new feature to existing instance, so why does the VS say i don't have the express version now, i am totally buffled
does this mean if i want to use the app_data file feature again, i have to install sql server 2012 express as a new instance again?
SQL Server Express Edition is the only edition of SQL Server that supports User Instances. Thus, if you want to use a User Instance and do not have SQL Server Express Edition installed, you must install SQL Server Express Edition.
If you have a "full" version of SQL Server, I would suggest using the ASP.NET SQL Server Registration Tool (aspnet_regsql.exe) to create the equivalent of the aspnetdb.mdf database.
Edit:
As indicated in the answer to Can we install Express edition and Standard edition of SQL Server on same PC User?, it is possible to install both SQL Server Express Edition and a "full" version of SQL Server on the same computer.
However, it sounds like you performed an Edition Upgrade which replaced SQL Server Express Edition with the "full" version of SQL Server. If this is the case and you still want to use a User Instance, install SQL Server Express Edition again.
If you are not sure which edition(s) of SQL Server is installed, see How to determine the version and edition of SQL Server and its component.
Please refer to my previous question here:
Link Here
Will this project type be useful for installing the necesary database on a servers machine?
That is not what you want. That project type is for creating SQL Server CLR Integration objects.
You need to actually install SQL Server, the product, or SQL Server Express, on the server machine.
Edit: Actually this might not be entirely correct under all circumstances. If you have the Database Edition of Visual Studio then you have different SQL Server projects which are intended for deploying and upgrading databases. But they still won't install SQL Server for you - you (or your customer) will have to do that separately.
Can I deploy SQL Server Express with my desktop application just like builtin database?
Because I don't want my client to set up separately SQL Server Express! Is it easy to integrate SQL Server Express into my desktop application ?
From the FAQ:
Can I redistribute SQL Express?
SQL Server Express will be free to use
and redistribute. The only
requirement that we have is that you
register to redistribute the product.
The reason we require registration for
redistribution is that we want to
ensure that we can get critical
security/product information to
ISVs/partners if necessary.
-Euan Garden
Product Unit Manager
SQL Server Tools
Take a look on how to do it:
How to deploy SQL Server 2008 Express as a prerequisite with ClickOnce
ClickOnce Deployment: Customizing SQL Server Express
How To Install Sql Server Express In Package Deployment With Different Instance Name
As said by MS:
"To obtain rights to redistribute SQL Server 2005 Express Edition, you must register with Microsoft. "
The link is: http://www.microsoft.com/sqlserver/2005/en/us/express-redistribute.aspx
Hope this will help.
By the way, you may be interested in MS SQL Server Compact : http://www.microsoft.com/Sqlserver/2005/en/us/compact.aspx
It's embedded dbms. It's free but also need a distribution rights registration:
http://www.microsoft.com/sqlserver/2005/en/us/compact-redistribute.aspx