943,692 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 1048
  • VB.NET RSS
You are currently viewing page 1 of this multi-page discussion thread
Apr 14th, 2009
0

to generate server in Lan

Expand Post »
I want to create server in one system and make another system as clients like if i save data in server that is also saved in clients system .So what datasource i have to give i mean to say that if i run setup in any system then that database is detected automatically i do not need to give its location.
Similar Threads
Reputation Points: 10
Solved Threads: 2
Light Poster
manoj_582033 is offline Offline
39 posts
since Nov 2008
Apr 14th, 2009
0

Re: to generate server in Lan

Are you running on SQL Server?
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006
Apr 15th, 2009
0

Re: to generate server in Lan

Are you running on SQL Server?
Ans :No I have access database and i want that : this databse is accessed by three system that are connected in Lan means in server i stord the database and through clients i access that database
Reputation Points: 10
Solved Threads: 2
Light Poster
manoj_582033 is offline Offline
39 posts
since Nov 2008
Apr 15th, 2009
0

Re: to generate server in Lan

Put it in shared location on lan and access it. But the question is Access able to handle more than one user concurrently? the answer is no.
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006
Apr 15th, 2009
0

Re: to generate server in Lan

Ramy has it right that Access is not a "real" database in the sense you can't have multiple users simultaniously.

Since this a VB.NET (programming) forum, I guess you're building the system at the moment. I suggest taking a look at some other data storage. Like SQL Server or MySQL. If the money is an issue, take a look at SQL Server Express and MySQL Community Edition. And there are few other DB options too.
Reputation Points: 218
Solved Threads: 201
Veteran Poster
Teme64 is offline Offline
1,024 posts
since Aug 2008
Apr 15th, 2009
0

Re: to generate server in Lan

These guys are right... Access will work on a very, very limited basis, but doesn't really qualify as a true database solution. We use MySQL for our projects, and it performs very well, plus it has the bonus of being free.

There is a second aspect to your question, and that is the auto-discovery. You mentioned you want clients to automatically discover the server without being told where to find it. Someone correct me if I'm wrong, but I'm not aware of a way to do that with MySQL or MSSQL.

In order to achieve that, you're probably going to have to write your own autodiscovery tool. This would most likely take the form of a small program running on your server, listening for broadcasts on a particular port, containing a particular bit of data to identify a requesting client. On the client, you'd want a bit of code to run at the beginning of execution that sends out a broadcast on your network and listens for a reply. When the server receives a broadcast asking for service, it would send back its IP address. The client could then use the IP address to connect to the SQL server. It would look something like this:

VB.NET Syntax (Toggle Plain Text)
  1. Client --- Is there a server out there? ---> Network Broadcast
  2. Server hears network broadcast and gets requesting IP.
  3. Server --- Yes, Here's my IP ---> Requesting Client IP
  4. Client --- Connect to SQL Database ---> Server IP

You'll need to read up a bit on how to create network clients and servers, listeners, and other networking topics, if you're not already aware of how to do it. But the above is the general outline of what would need to happen. After that, your client could just connect to the database using ODBC, like normal.

Good luck!
Reputation Points: 17
Solved Threads: 3
Junior Poster
PirateTUX is offline Offline
101 posts
since Jan 2007
Apr 15th, 2009
0

Re: to generate server in Lan

Pirate, in business application development, we can't rely on auto discovery tool there's something called connection string, which holds database server IP\name, user credentials, some other properties, etc..; may be encrypted or may be not. and you configure it at clients' place.
And you said ODBC. and this is correct.
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006
Apr 15th, 2009
0

Re: to generate server in Lan

Ramy and Pirate are right that the server i.e. DB's location should be known before. When the client application is installed, the credentials and correct connection string is formed and saved to client's configuration settings.

This may go a bit OT from what the OP asked, but SQL Server has SQLDMO (COM component) which can be used to enumerate server instances from the LAN. Once the server instances are known, databases can be enumerated with SQLDMO. MySQL may have something similar (and probably has) but I'm not totally sure about that.
Reputation Points: 218
Solved Threads: 201
Veteran Poster
Teme64 is offline Offline
1,024 posts
since Aug 2008
Apr 15th, 2009
0

Re: to generate server in Lan

It has. And he can use SMO, to enumerate every object in the server.
But it's not applicable in business application development except in very critical situations.
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006
Apr 16th, 2009
0

Re: to generate server in Lan

Ramy - I was just going off of the OP, which said:
Quote ...
if i run setup in any system then that database is detected automatically i do not need to give its location.
If there's some sort of mechanism built into MSSQL or MySQL that allows enumeration over a LAN without prior knowledge of a server's IP address, than by all means, that's the way to go. The project I'm involved with at the moment actually stresses having the clients NOT know anything about the SQL server. It's a game, and in order to minimize attempts at cheating, we're working on our own custom protocol, so clients will not be using SQL queries at all, just the customer server software.

Teme - I've been working with MySQL for a while, and don't know of any mechanism like SQLDMO. That doesn't however, mean that it doesn't exist, and the fact is that so many people have written so many good extensions to MySQL that it wouldn't be at all surprising if somebody had written one like that. The Pirate project doesn't require any MySQL extensions, so I'm not very well versed in this area.
Reputation Points: 17
Solved Threads: 3
Junior Poster
PirateTUX is offline Offline
101 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Autorefresh Windows Form
Next Thread in VB.NET Forum Timeline: SqlDataAdapter.Update Error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC