I'm in the process of developing a .NET application that needs to be able to run without a database engine installed on the target machine.
It's predecessor used an mdb file to achieve this. Is there a better alternative now? The database will only have one user in 90% of cases. In the other 10% an standard SQL Server would be used.
The new version of SQL CE looks promising, as blogged by Scott Gu.
There is an ADO.NET Data Provider for SqLite. It provides a fully-functional, single assembly "database engine" that can be deployed with your application, and used without being "installed" on the target machine.
Also...
Advantage Local Server
Is this going to run only on Windows boxes? If so, you have a database engine installed on every machine that is Windows 2000 or later, and that's Jet 4.0 (including DAO 3.6). So, as long as your deployment is limited to Windows and you're not compiling for 64-bit, you can continue using an MDB.
Related
I wanted to create a desktop application with database, am using Visual Studio 2013 and C# , Can anybody suggest me what server I used to create my database, in order to run my application in my client's system locally with out installing any database server in client's system [ie, with out installing MsSql server or MySql server or Acess], I want my app works properly when installing my own application's exe file ?
And Now am using MSSQL server with my application , Is there any way run this application in client's system locally with out installing MSSQL Server? [my application front end works when I install .Net FrameWork 4.5 , I need something like this for my .mdf databse in Sql Server]
somebody says about SQL Server Compact ,but i don't know how to use it
You can use SQL Server Compact, which can either be installed separately or deployed as part of your application.
See here: How to deploy SQL Server Compact Edition 4.0?
And here: https://msdn.microsoft.com/en-gb/library/aa983326(v=vs.110).aspx
Your DB code in your app - apart from your connection string - should not need to change as you're already using some version of SQL Server.
There is also SQLite, which is as far as I know is well regarded, but I know very little about it. http://www.sqlite.org/
Hope that helps!
It is not unusual for an application to require an existing functional database server. Of course this is appropriate only if your target audience is technical enough to install the prerequisite on their own, or if the target environment is guaranteed to already meet your prerequisite.
If not, you need to fall back to an embedded database.
Hi I published my desktop application on visual studio as a clickOnce installation but I seem to have problems with SQL and Entity Framework Exceptions as this is what my software uses in order to display data. Is there any other way to get around this problem ? Here is an image of what happens when the user wants to see the specific data. Mostly the Exceptions range from both SQL and Entity Frameworks. This only happens upon another computer and not mine which the Software was created on.
Any help would be greatly appreciated !
If you wish to deploy your database with the application binaries then you can try SQL Server Compact instead of the full version of the server, which requires the server to be installed on the machine. The msdn link here will help you with the process -
http://msdn.microsoft.com/en-us/library/aa983326(v=vs.110).aspx
and you can download the application from here -
http://www.microsoft.com/en-us/download/details.aspx?id=17876
In short, SQL Server Compact databases files (.sdf) can be deployed along with your application and some binaries and dlls to help it work on the destination. The msdn topic will show you how to do this.
The full documentation and a good starting point is here too -
http://msdn.microsoft.com/en-us/library/aa983321(v=vs.110).aspx
IMPORTANT Entity framework has some limitations when working SQL Compact Databases, make sure you check and see that this won't be a problem for you.
http://technet.microsoft.com/en-us/library/cc835494(v=sql.110).aspx
I have a WebService developed in .NET which connects to an Oracle Database. To do that I use the ODAC which Oracle Provides.
But every time I need to install my application on the Client Machines, I have so much trouble regarding the "Oracle Client", depending on if he already has an Oracle Client installed that is not the same version, or if he has one with a different platform (32bit, 64 bit), or anything else.
The point is I spend too much time trying to fix that thing every time.
Is there a way I can configure my application that I can install it, and it has everything it needs. And I don't need to worry about what the server has installed or what will be installed on it. Is there a way?
ODP.NET is distributable and multiple versions can be installed on one machine. You can include it with your app and that will minimize versioning issues.
It sounds like you are currently using the unmanaged ODP.NET driver. If so, have a look at the XCopy install. You can look at how the scripts work and include them in your own install.
If you can use the Fully Managed ODP.NET that will mostly eliminate the 32-bit vs 64-bit issue (unless you are using distributed transactions). And it is only 10 MB.
http://www.oracle.com/technetwork/topics/dotnet/whatsnew/index-101716.html
Maybe you can check out the Oracle Instant Client?
Oracle Instant Client
The Basic download contains all files needed if you're only wanting to connect to the db from your .Net app. I have used this a lot in the past. Simple install, too.
I'm looking for a database system to use with c#. I've mostly used SQL for now, but, this is a small applicaiton I'm gonna to create, which:
-Runs at max 1-2hours each day(so I don't want to have a SQL Server running all the time)
-Will be installed on an usb key(only requirement has to be to have .net 4.0 installed), so it has to be nomade.
What can you advise me? I search a little, but I don't how this kind of database are called.
You can look at the embedded version of Firebird
Firebird have more SQL function than SQLLite which also be a good choice but you can more easily to switch to a full version of the server
The embedded version is an amazing variation of the server. It is a
fully featured Firebird server packed in just a few files. It is very
easy to deploy, since there is no need to install the server. It is
ideal for CDROM catalogs, demos or standalone desktop applications.
Here you can check Entity Framework support
Well, i'd use a file-based "portable" database like:
SQLServer Ce 4.0
Sqlite (I used this provider in the past and it works well, but you have quite a bunch of options).
Does a Microsoft Access Database is a possible solution to this question? SQLite seems to be exactly what I want but I cannot make it work in the .NET framework 4.0.
I was thinking about using a Microsoft Access Database but I don't know if when deploying my application the database is going to be portable?
Do users need to have Microsoft Access installed in their computers if I plan to deploy my application with a Microsoft Access Database?
In case all this is possible and I decide to use a Microsoft Access DB where will I place the database?
As a resource and extract it when installing it?
I haven't had problems using SQLite using with the provided .NET assemblies.. As an alternative you could try using Microsoft's SQL Server CE, which is a lightweight database designed for deploying to clients. I don't see why you'd use Access db instead of either of the other two..
Filip-fku thanks to your answer I found how to work with SQLite and the .Net framework 4.0 in here
The Jet database engine is installed on every copy of Windows beginning with Windows 2000, so if you use MDB format, you don't have to install anything to have access to a Jet MDB file.
If, however, you use ACCDB format, you'd have to install the ACE.