Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Comments
Sergey Alexandrovich Kryukov 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.
--SA
Sergey Alexandrovich Kryukov 11-Jun-12 14:54pm    
The English work "ameliorate" is so advanced, that I trust your English learning is in good hands. :-)
--SA
Sandeep Mewara 11-Jun-12 15:00pm    
Winforms? ASP.Net? Console App? Basically what is the client interface for invoking the server.

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:
Try:
using (SqlConnection con = new SqlConnection(strConnect))
    {
    con.Open();
    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.
 
Share this answer
 
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.

vas.shrinivas002@gmail.com
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900