Use SQL Server CE 4.0 multiuser and different processes - c#

I searched the WWW and found different answers. sometimes I read articles about the SQL Server CE 4.0 and the multiuser ability. But I can not use it with different processes or on different machines at the same time. Unfortunately, I used SQL Server CE and now I need exact that feature. Is there a way to do it? Or is the only way to use a SQL Server Express edition or another file base db like sqlite to avoid a complete code change?
Update: yes, all users need to read and write!
Thanks for any suggestions!
tro

Use SQL Server Express (or any other edition), not a filebased database for this scenario.

Related

.NET Embedded/Offline DB that works with EF

I've been researching different solutions for an offline database.
Basically I have a desktop application and I would like it to communicate with a database, without requiring internet connection. So I am looking for a way to ship my app along with a database that the app can work with.
All my DB intercation will happen through Entity Framework, so I need a solution that is compatible with it. So far, I have always used SQL Server Express for my DB, but as far as I know that requires that SQL Server is installed on the user's machine, which is obviously not what I need.
My DB will not need to handle huge amounts of data. (Worst-case would be something around 100,000 - 1,000,000 rows of data in the DB).
From what I am reading I found that SQLite, and SQL Server CE and a feature of SQL Server called LocalDB might do the job for me. (SQL Server CE is no longer supported my Microsoft, so I am guessing its not a good idea)
I was wondering if I am on the right track here? Is this the way to go, or is there a way to embed my SQL Server Express into my app.
SQL Server Compact and SQLite can both run as embedded and work with EF (SQL Ce much better than SQLite)
LocalDB might also be an option, requires admin access to install (not during runtime)

How to use database without installing it?

I have a database in SQL Server 2008. I want to deploy my software with CD.
I want to give end user 2 choices :Use from CD and install it.
When end user selects the "Use from CD", I don't want install program.
How can I do program execution without installing?
Please help me about this problem
Thank you for your attention.
The program is coded In C# in MS visual studio 2010.Database Management system is MS Sql Server 2008
Use an embedded database which requires no setup and in-process execution, in your case best option is probably SQL Server Compact Edition
Edit: I know there are also other alternatives like BrekleyDb or SQLite but since Atayi is using SQL Server right now for his database, I suggested SQL Server Compact Edition to avoid any issue and stay on essentially the same technology/platform.
Please help me about this problem
Don't use the technology you selected.
This is like saying "I want to drive a ferrari, but one that uses no fuel". Engines use fuel. SQL Server requires installation.
Alternative is SQL Server CE which you can load into the process.
THat is it. Run from CD is not possible without having SQL Server installed if you use SQL Server. Arguing wont change that.
First of all, I don't know if SQL Server '08 exists as a portable version, but if it burned on a cd, the use of a database is not there. The burned files cannot be changed :-)
A portable DBMS is SQLLite, there are bindings for C# :-)
You can "Silent Install " Sql server also, that way the client will not be bothered by the configuration of the server.
When running from CD - change database back-end - use simple Microsoft Access Db file with ADO ODBC connection. In such case - you will have almost same SQL language and no need to install something for access db (huh, maybe general odbc drivers if they not exists).
When running from HD - switch db backend to full-scale MS SQL server ...

SQL Server Express database replication/synchronization

Situation:
Hi, I'm coding using Lightswitch (C#) and am thinking of deploying to multiple sites the same application and database.
The databases need to be synchronized/replicated to each other so each would have a merged database. However connectivity between the sites is not going to be 100%, so the synchronization/replication would be done whenever the connection is possible.
Question:
Would it be possible to accomplish this through SQL Server Express? If not, what would be the best way to accomplish this by code? Thanks!
SQL Server Express 2008 can be a subscriber but not a publisher, see details here:
Replication Considerations (SQL Server Express)
Microsoft SQL Server 2008 Express (SQL Server Express) can serve as a
Subscriber for all types of replication, providing a convenient way to
distribute data to client applications that use SQL Server Express.
When using SQL Server Express in a replication topology, consider the
following:
SQL Server Express cannot serve as a Publisher or Distributor.
SQL Express doesn't support replication (except as a subscriber, as Davide pointed out). I think your best bet would probably be a windows service that keeps track of table names and the most recent timestamp processed.
Integration Services is also an option if you have a server to run it on.
Do you need data to be moving one-way or both ways?

DBMS for POS software

I want to develop a POS application in .NET (C#) that would be used to rent items. I have a good idea of what will be done and the famous question that I have is about the DBMS that I should use. I would like to use MySQL database.
The question is: If some places use only one computer (no network, no internet connection), can I use a MySQL database in local? Do I need to install MySQL server on all thoses computers to be able to use such a database? I know SQLite but I'm not sure if the limitations can cause problems in the future... I also looked at SQLServer Express versions.
(I must consider that other point of sales are using multiple computers and more transactions so there I can't put sqlexpress or sqlite)
So can anybody suggest me what I should do in that situation?
Thanks
You would be able to use MySQL in localhost - and it would need to be installed on each local machine.
You could use MySQL. If you are sharing a database between several computers you should just be able to install the MySQL client components.
As for which database you want to use, I would highly suggest SQL Express. The security model and tooling is much better. There is nothing stopping you from using SQL Express as a shared database server until you out grow it.
SQL Express Redistribution EULA
POS systems like Open bravo POS software where special user types and hardware devices support are required.ou can use sharing a database between several computers for using sql.

fast local database

i have a desktop application that talks soap to a server. the communication is very slow so i want to download a lot of the data up front and query from my local database. i wan this local data to persist after the application shuts down so what is the best way for doing this . . . are there any good products / examples to do this . . there are about 25 tables that i am caching.
SQLite is perfect for this. A couple years ago I wrote a "smart client" application where I maintained a local cache so that users could still use the application offline. I used SQLite and had no problems, it is very small, persists quickly, and most modern ORMs support it. (I was using NHibernate)
http://www.sqlite.org/
Berkeley DB is a good, standalone DB. You should also consider ESENT, which is built into windows. Here's a write-up by Ayende.
The H2 database might also meet your needs. Microsoft offers a compact edition of SQL Server: SQL Server Mobile Edition. If SQL Server and TSQL is your thing, this might be a good choice.
You could always use an Access DB, usually pretty simple to ingereate with in .NET app and doesn't require any server to be installed or configured on the client.
Consider using Firebird, I believe they have a ADO.NET extension too.
I would consider SQL Server Express or even SQL Server Compact Edition, which operates on individual database files, like Access does. Despite this, it's still SQL Server.
You could also consider Apache Derby, which is used in Sun's Glassfish Java EE server.

Categories