I make a software using C# & my database is msaccess..Now I want to make a gateway which will be install in all pcs in a local network & i want to make connection with that database which is in a single computer...but i dont know what is the procedure to do that in C# windows application..please solve my problems...thanks.. I try to upload my data from client pc to the database which is in a server..I dont know the codeing to do that..pls send me some code for that...advanced thanks..
views:
7answers:
1
A:
It would be helpful to know a bit more about what you're trying to achieve (you can edit your question to provide more information) but fundamentally you've got two options:
- As its an access database you can put the .mdb file in a shared folder and it will be accessible to multiple instances of your application (store the location in the configuration data for your application). This will work - in some cases very well - but access can be a bit slow running over a network as its all file based.
- Create a self hosted "web" service (WCF ideally, but I can't remember what your options are for VS2005) that provides the methods you need to interact with the database and then connect from your client applications to the "server" application over the network.
The "best" solution will depend on the detail of your problem and what you're trying to achieve. If each instance of the application accessing the database directly is the preferred choice then I'd strongly advise you look at using SQL Server Express instead of access.
Murph
2010-07-08 18:04:50