My Application was moved to a shared Network to offer the Clients a Folder with the Program. In this Folder is the SQLCE Compact Database too.
I only need to read from a Database. In my Opinion should the standalone in read-only mode not beeing blocked from the current User, but it is. This blocking access is in my opinion only useful if multiple users try to write...
Is there a way to get a SQLCE Compact Database ready to run for multi-user over a Network?
Unfortunately The short answer is no. SQLCE is single user/instance by design. However you can create a service that load your db and allow your program instances to read and write in the db through the service. The other option is to modify your app to create a local copy of the db and sync the changes using a SQL server. what doesn't make any sense since your app is in a shared folder, so why don't migrate to a true DB like sql server?
SQLCE and SQL server are full compatible, basicaly you just need to change the connection string.
Related
I have a disk top application made by c# visual studio. My question is do I have to setup SQL server on each client to use my application? or there is another way to attach my database with my application and compress it as one and send to each client and those just extract that file and use the application correctly?
On a real scenario, your database should be placed on a remote server and the clients should only access the database through your API (that will need to support authentication or any other identity based systems).
If your application only needs to store some local information (relevant only for your client app), then you can just use LocalDB or AppSettings, depending on your data structure.
Otherwise, if your application contains more complex features, then you will need an API and a remote DB managed only by you.
To conclude, you only need to setup Sql Server once, when you want to create the design of it (tables, columns, links). The clients will only have to connect to it and pull their data. And this task can be done without installing SqlServer. This link shows you that you only need System. Data assembly to connect to a Sql Server DB.
Yes you need to instal SQL server on each machine or if you go for LocalDB then also u need to instal SQL server engine ,and you have a better option u need to buy sqlserver from AZURE (it's free for one month try if want click here AZURE)
I am making C# app that rely on data from one old SQL Server 2005 machine.
Since I have only acces to read only data from that server, I need to build up some kind of handmade replication.
My app is going to use SQL Server 2012 and I am planing to read data from old SQL server in nightly tasks.
Before I start reinventing the well for sync data between two SQL Servers, I'll love to try to find some kind of library or system which can do the JOB.
Unfortunately I can't just setup replication between two SQL Servers because source of data is at SQL Server 2005 version and I do not have admin rights on that server.
I just need few tables to keep sync (updated) at my new SQL Server.
Is there some kind of embedded replication which can be called from code, and which have no needs for writing and admin access to publisher database?
I've started work on a project that requires an SQL Server Database. I will be building a front end application in c# .Net 3.5, that will use LINQ to SQL.
I need to host the database on a network share so that a group of users can all gain access to the database, mainly for read only.
I know that SQL Server Compact is designed to run on the local machine and my company is not willing to front the costs of a full blooded SQL Server.
Is there a way of achieving what I need to do via SQL Server Express?
If so, which are the best guides on how to set this up?
Thanks
If you go with the (free) SQL Server express, it will do what you need - but you don't access it thru a network shared drive - the server would be located by an ip address (or equivalent DNS).
You c# application would be talking to a service - SQL Server - not reading to/from a database file. The service will handle the interaction with the database. Only the SQL Server service will need to know where the file actually is - your client machines won't know and shouldn't care.
If your background is only with file-based databases - i.e. MS Access, you need to change your mindset a bit about how SQL server works.
You can install a SQL Server Express instance and install the SQL Management Studio Express for all users who need access to the database. The Express Edition is a standard SQL server with limitations regarding the number of processors used, the maximum amount of memory used and the maximum database size. If these limitations don't bother you, it should work fine for you.
Using a network share as a database storage to access db files from several clients is a bad idea, as the sql server instance should always be the only one directly accessing the database, both for read and write access. Configuring several instances of SQL Server to access the same database will probably not work - and if it works, it will probably create havoc in your database files.
I'm working on a program that will work very nicely with a database structure and using mysql. I could easy do this with a common server and common database. However I'm looking for a way to have my client(s) use the program on an offline machine without having to install any database managing software.
Basically I want the installation to set up the necessary tables on their machine and have them fill in the database with information relevant to them. Before I start though I wanted to know if this was possible to connect to and manage a database through a C# application with out installing sql software.
You could consider using SQL Server Compact Edition.
SQLite is another option.
Both of these can be deployed with your application and need no separate configuration.
Yes. It is possible. How to do it exactly depends on the database connection approach you're using. For example, this approach shows how to use DataReaders. That's a very old approach. Modern approaches are recommended to use LINQ to SQL, which can be configured to access remotely by setting up a DataContext to point to an external resource.
Basically, wherever you can define a connection string to connect to a DB, you can make that string point locally or externally. An external resource must obviously be available through some URL in order to connect, of course.
You can not connect to a mysql database without installing mysql.
However you can use in process database like sqlite or Compact SQL. They are not traditional server, but rather a library that keeps the database in a local file.
I am starting an application (c#, .net) that will interact with a Microsoft SQL database. I need the ability for multiple clients to access the data concurrently so I an going to use a service based database (.mdf). Is it possible to develop the application using a local database (.sdf) and then easily switch it over to a service based database when it comes time for deployment? Is that how this type of development it typically done?
You can control the data source by providing connection string to your database in .config file.
You can even create Debug and Release versions of your .config file with different connection strings. Debug can point to your local machine and Release to production.
Development shops vary, but it is pretty common to develop apps using SQL Express locally and then use a full installation of SQL Server for the production environment.
The only thing I would advise is make sure that the DB you chose for your dev environment supports the same features as what you expect in production. For example don't use SQL Express on your dev box when you expect to use Oracle in production.
If the database schema in both backends is exactly the same than the only thing you will need to do is change the connection string when you are ready to move to the service based database.
Be aware that the slightest change in the schema can (and probably will) cause problems.
You want to use SQL Compact Edition (as you said database file extension is .sdf), right? You can use MSSQL Express Edition instead, as it acts more like full MSSQL Server, and is still free and not so hard to install on developer's machine (I personally prefer this option). There are differences between the two (as explained here: http://blog.sqlauthority.com/2009/04/22/sql-server-difference-between-sql-server-compact-edition-ce-and-sql-server-express-edition/). If you don't want features like triggers/procedures/views in your database, you can still use CE, though.
If you have multiple clients then you should use SQL Server Express (.mdf file) - SQL Server Compact (.sdf file) is useful when you are building an application that is going to be deployed on client machines and will run standalone, e.g. windows forms application with a local database. SQL Server Compact is just an alternative for MS Access .mdb files or SQLite, the so called "embedded databases", while SQL Server Express is a real database server (albeit with some limitations to render it unsuitable for large commercial applications) and should be used in the cases where multiple clients use central database, e.g. web applications and smart client apps (the latter could also make use of a local embedded database though).