Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on setting up the server

 
Theo van Loon
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,
i have a minor question :
When i set up my client is it ok to do so :

I bind DataAcces upon setting up my Server. Is it ok to try to go through this code and give a message server is not setup when it fails?
If not how can i do a check if the server is set up?
Thanks a lot!!
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Theo,
Originally posted by Theo van Loon:
I bind DataAcces upon setting up my Server. Is it ok to try to go through this code and give a message server is not setup when it fails?

Yes, that's fine.

If not how can i do a check if the server is set up?

You don't have to do this but I check that the server is set up correctly when I start the server. I start the server on the server computer. After it binds the database server to the registry, my server code attempts to connect to the server as a network client. I do this for two reasons: 1) because I need to get the database schema data from the file to support my server preferences editor (most people probably have no reason to need this), and 2) because it tests the server configuration (you might be interested in this).
If the server configuration test succeeds, it means that the server is configured to open a valid database file. If the server configuration test fails, it means that there's some problem with the configuration of the database file. If a problem is detected I inform the user and allow the user to select a different database file. After the server configuration test succeeds I kill off the network client I started.
This makes me confident that when a real network client tries to connect to this server that the server will be able to open a valid database file. If there's a problem with the server's database file, I want to find out about that problem and correct that problem while the user is starting the server. I don't want to discover this problem for the first time when a network client tries to connect to the server, because while I can detect the problem for the client, there's nothing the client can do to correct the problem (i.e., change the database file for the server).
[/QB]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic