Click here to Skip to main content
13,558,758 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi codeproject friends,

I'm asking to day for am able to develop an database application, my idea is simple.
I want to develop an client/server application in LAN, the server takes the database and the client need to invoke this database as remote. How can the client invoke the server(how can he send the request an obtain respense).

I'm so sorry, i'm doing my possible to ameliorate my English. Thank You
Posted 11-Jun-12 8:11am
SAKryukov 11-Jun-12 14:53pm
What is "invoke this database"? First question is: is that works based on the client-server model, or is the database is file-based (or file server based)? I would not recommend the second option; working on a network with non-client-server database does not worth the effort.
SAKryukov 11-Jun-12 14:54pm
The English work "ameliorate" is so advanced, that I trust your English learning is in good hands. :-)
Sandeep-Mewara 11-Jun-12 15:00pm
Winforms? ASP.Net? Console App? Basically what is the client interface for invoking the server.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I assume you aren't planning on writing teh dabase server from scratch - that would be a very silly start to teh project! :laugh:

Install SQL server on one of the PCs - the Express version is fine for starters - and then you just need some code to run at the client and a connection string:
using (SqlConnection con = new SqlConnection(strConnect))
    using (SqlCommand com = new SqlCommand("SELECT iD, description FROM myTable", con))
        using (SqlDataReader reader = com.ExecuteReader())
            while (reader.Read())
                int id = (int) reader["iD"];
                string desc = (string) reader["description"];
                Console.WriteLine("ID: {0}\n    {1}", iD, desc);

To find the connection string, try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I presume you are trying to create a web application that interacts with a database.

Here are two tutorials that will help you get started in interacting with a database server from your web application.

How to connect to sql database through SqlClient and insert a record[^]

How to save an image to the database and display it in with C#[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Hear is the procedure:

I have created a project in vb

first create a project

compile that application,Make it EXE application

i am useing windows7,So i installed iis7.5 through control panel

now configure your EXE application with iis

Select your folder in iis and go to security tab change it to Everyone

That's it,Now your application available throught LAN.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01-2016 | 2.8.180515.1 | Last Updated 18 Dec 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100