How to connect multiple computers to the database in Windows Form C#

marzban hadian 0 Reputation points
2023-09-10T05:32:18.3633333+00:00

I have a Windows Forms application that I want to install the database on one computer and install the Windows Forms application on several other computers that are all connected to the same network so that any user who adds information to the database can be viewed by other users.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,339 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Jiale Xue - MSFT 49,126 Reputation points Microsoft External Staff
    2023-09-22T02:30:20.74+00:00

    Hi @marzban hadian , Welcome to Microsoft Q&A,

    You don't need to download visual studio in a production environment. You only need to download the corresponding operating environment, which can usually be selected in the installation package.

    For the database, a database driver for the applicable database type needs to be installed in the production environment. For example, if you are using a SQL Server database, you need to install the SQL Server database driver.

    This is possible if you want to use the same database. It is more recommended that you place the database on a network server. You can have a good connection after using it in the application.

    If you plan to use the database on your local computer, you need to do the corresponding network connection homework yourself, which may be a bit complicated for novices.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  2. Bruce (SqlWork.com) 72,511 Reputation points
    2024-08-24T20:25:32.4033333+00:00

    On one on the computers you will need to install the database server. You don’t specify which database engine you are using. You will then probably need a discovery service, or a configuration ui for the users to specify the name of the computer picked to host the database. Database servers typically have minimum hardware requires, so be sure the users have one. Also how are you backing up the database?

    You don’t specify what .net framework you are using, but this must be installed on the users machine. You probably need an installer app.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.