I am tasked with creating a central Database for a small office to allow multiple computers to connect to a database using a C# program. I have already written the program and it currently connects with a database that is in the bin folder.
I am completely lost as to how to move on to creating a multi user environment. I searched all around SO and tried downloading Microsoft SQL Server, but I have no idea how I would set this up in the office and allow it to be accessed from multiple computers. Also, from the information I've gathered, Microsoft SQL Server needs to be running at all times to allow a connection -- this isn't a deal breaker, but is there any other methods that wouldn't need this? There isn't exactly a "main computer" in the office that is always running.
To run a centralized sql server database in your office you would at a minimum setup sql server on a "server". The server can be pretty simple unless you expect a heavy user load.
The server has to be on in order to allow connections.
Sql Server exists in a free version called Sql Server express, but it has limitations when it comes to scalability, so it's not meant for large systems.
You can download it and install it on your server in the office and connect to it through a connection string in your application.
You can also consider open source platforms like mySQl, but it would still require a central server.
Alternatively you can consider a hosted solution where you have a company host the database for you in their data center.
If you do not have the server computer in your office that will host the DBMS and allow others to connect to your DB using the web interface, try to use Windows Azure. This will cost you some money. Here you need to estimate what is cheaper for you: purchase a server or pay for the azure.
Related
We are in the process of migrating an old VFP application into a .NET WPF application with SQL server.
During the process we still need to read/write to the DBF files to keep our business working properly.
To do this, we use the standard OLEDB adapter that is available. However, our sysadmin is asking if we have an alternative way to access the DBF files.
Having each user connect to the files is not the best option from a network/security perspective. Specially when connecting from home through a VPN.
I've already tried to move the connection to a single server by exposing the data through an API. But that was slowing down the application too much. In some situations we synchronise the data through background jobs (Hangfire implementation). But this can be time consuming to implement.
Has anybody used any other techniques to do something similar while migrating a VFP application?
OLEDB is still the best option. Within the application, you could impersonate a specific user that has access to files.
Also Sybase Advantage Server can connect and work with VFP data files. Local mode is (was) for free and server mode paid. You might try checking that too.
Locate data on single PC as server. Access via RDP - kludges available to support multiple connections. Increase security if needed by connecting over VPN - then RDP.
I developed a Winforms application with SQL Server 2008 R2 database for one my friends.
When I deployed & installed it on my friend's PC; software clearly shows database file. If he open that file in SQL Server, then he can able to watch my SQL queries, tbl structures etc.
I just want to hide all this from my clients.
How can I do this?
I search some of software on Internet. When I installed it on my PC; it not showing me any database file. How they do it?
Please help me.
If your application and database are both deployed on your friend's PC, there's almost nothing you can do to truly block him/her from getting to your database.
There is no feature in SQL Server that blocks schema view from an authorized user (e.g. admin) and if you own the machine, you can present yourself as admin to SQL Server in multiple ways even if you were not originally added to the admin role or given SA account access. You can setup hurdles like putting everything in stored procedures then encrypting the SP but it's just a small hurdle, not a wall.
This is not unique to SQL Server, the same issues apply to pretty much any RDBMS in the market. If you own the box, it's not hard to get to the DB contents. Software vendors have been trying do this for decades and most just give up and protect their IP legally instead. That's no consolation for you but it is reality.
If using a service like Azure is viable, you can host your app in Azure and the database can be Azure SQL DB or a regular SQL Server in a VM. I'd recommend the former if the feature set and surface area work for you; it's not identical to the SQL Server box product you're accustomed to. However, it is far less work for you to manage and secure. With the app also in Azure, your friend and clients will access via a browser and never have direct access to the database. Even if the app is installed locally on your friend's or clients' machines, it's easy to design the app such that they can only access data and nothing else.
I need your help to answer a question.
I coded a basic c# portable exe application that uses an Access Database on a server computer. On the network there are some client computers that runs this application and retrieve and store data via this database placed on the server computer in a shared folder. Every client coputer can access my database with this connection string:
#"Provider=Microsoft.ACE.OLEDB.12.0;Data Source =\\ANKFILESERVER1\aractakip\DatabaseAd.accdb
So far, there has been no problem. But as known, Access (Oledb) database has a limited capacity to save datas and since i'm worrying that someone change or delete my database files -authenticated for everyone- i decieded to use another database platform like postgresql.
My question is, if i install postgresql on the server computer and migrate my database tables, Are every client computers needed to install postgresql to access my database tables? If yes, what should be my connection string?
Thanks in advance.
You will need a client driver - like psqlODBC - installed on each computer that connects to PostgreSQL via MS Access, yes.
You can install psqlODBC separately, or using the main PostgreSQL installer. The separate psqlODBC-only installer is an msi that can be deployed over Active Directory, making management easier.
The connection options are covered in the psqlODBC documentation.
Microsoft Access is really written for the Microsoft JET / OLEDB engine, and to communicate with Microsoft SQL Server. It works with PostgreSQL, but it doesn't fully "understand" all PostgreSQL's features. It also does some things in totally non-SQL-standard ways that work on MS SQL but do not work on PostgreSQL. So it can be awkward to use MS Access with PostgreSQL due to things like Access not really supporting SEQUENCEs properly. Note, though, that I haven't used Access since Office 2008, so things may have improved.
I have developed a winform application in C#.net and using SQL Server 2008.
My application inserts and updates values into database.
Is it possible to install the application on a another system which doesn't have sql server on it?
Imagine using sql azure. Cloud based sql server. The database is never on the same physically computer. It's all down to the connection string.
With an on premise database you need to make sure the database allows external connections, maybe opening up firewall etc. then make sure the connection string is set correctly on the application to talk to external database.
You can even configure to change the connection string as required pointing at different databases depending on the individual requirements.
Scott
Yes, you can. You can access the DB remotely by referring remote DB server in connection string.
It is possible, if you are looking to run the application on machine that is running on the same Domain as the SQL Server and has privileges to the SQL Server.
I am new here to this forum so mind if I am asking a question already answered somewhere.
I have made an application in windows form, now I want to implement it onto another client PC. I published it and I can install it somewhere else fine, but the problem is that when there is a database involved I just cannot get it to work. I have tried everything I know, I attached the DB with the setup using the setup wizard creator but I cannot get it to work.
My main question is: How can I publish an application successfully, along with its DB and everything in working condition, without installing MS SQL on the client PC, if possible?
Typically, when using SQL Server, you are running in a client-server scenario, and SQL Server is the server portion. The connection string stored in app.config would point to the SQL Server, and the user would never need to know anything more about the database.
If your application is designed to be run outside of the network (i.e. 3rd party), you have a couple of options. First, if you want to use a full version of SQL Server, you can make a client installer and server installer. The server installer would be for setting up the server side (including the installation of SQL Server), and during the client setup, they would need to enter the name of the database server.
If the client has SQL Server Express installed, you can supply the database file, and do a direct connection to it rather than installing it inside SQL. However, if the client does not already have Express installed, this won't work.
Finally, SQL Server Compact Edition is designed for running on the client. You can do a "bin deploy" - that is, copy the SQL CE .dll files with your application, rather than installing the software, and the client can use the supplied database. If you haven't written the application for CE, this would require some rework.
you can also use sqlLite , it just need a bit of modification as it stated by Dave Simione