Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

client-server architecture

Status
Not open for further replies.

sp76

Programmer
Jul 1, 2003
59
AU
Hi

Here is the scenario:

I have a LAN with 5 computers. I have to design a database system in VB.NET-Access such that the database resides on one of the computers and other computers access that database using client-server architecture.

How do I set it up?

Any comments, suggestions, links will be greatly appreciated.

Regards.
 
Inasmuch as I understand what you're looking for, I would put the Access database on one computer and interface it with a VB.NET windows application on the other four computers.
 
So once I have installed client application on each machine, how shall I set the database path? Do I have to make some provision of changing database path from client application? How can I explicitly set the database path from my application?

Sorry I am new to client server architecture.
 
I wouldn't recommend allowing users to access the connection string via the application unless you have a user security table setup that might restrict a non-administrator's access to it. I think keeping it in a database table is the best way, however, if you're using VB.NET you could use the application.exe.config file to store the connect string. Anyone would be able to see the connect string properties this way, though.
 
Wouldn’t storing the connection string in a database table require accessing the table?

Once I have installed client application on each machine, how shall I set the database path? How can I explicitly set the database path from my application?

In standalone system, we can default the database path to application path. How can I do it in client server architecture as database resides on a network and I am not aware of the network path?

Could you please provide me some more detail on application.exe.config.
 
You're right about storing the database connection string in the database. I'll give more detail about the config file tomorrow when it's not so late [bigsmile]
 
i think the first question you should ask yourself is not so much how to connect to the access database is, why are you having an access database.

basically no. they are bad. i would firstly advise you that you should at least be using an msde database. this is free and pretty easy to use. this will reside on one pc.

advantages of using msde is that it basically has all the power of sql server. it will allow you to write stored procedure. this will make the code more maintainable as well. if the 5 pc become 20 it is easy to scale upto fully blown sql server.

dont go down the access route is my advice. please just dont.

config file. add a config file to your application solution

use the import system.configuration

your connection string will then have dependant on database i will do the msde connection

<appSettings>
<add key="connectString" value "ServerName= <computer>\<database instance>; database = <database name>; Integrated security = SSPI" />

</appSettings>

of course if you are not using integrated security then you need to take that bit out and add
user id = <username>; password=<password>

well hope that helps
 
Thanks DerPflug and Kbromwich for making things clear.

Could you please send me the link from where i can download msde.
 
MSDE is on the MS Office installation discs. Can't remember the path off hand but you can just use Windows Explorer to look for it.

Rhys
Buffy: Spike, what are you doing here, five words or less!
Spike: Out for a walk... bitch!
 
Don't forget to go to the MSDN Downloads website after installing MSDE and patching it up to the latest, as it is susceptible to the SQL Slammer worm.

Rhys
Buffy: Spike, what are you doing here, five words or less!
Spike: Out for a walk... bitch!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top