• Post Reply Bookmark Topic Watch Topic
  • New Topic

closing db

 
walid aly
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends
the assigment says that the client can use all the public mthods in class data
method close is one of the public methods in class data!
am i suppose to give anu client a privillage of closing the whole db while other clients might be still connected???

thanks
 
Matt Ghiold
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The key word there is "can", it's not in the requirements so I would not do it.
Just my $0.02
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

am i suppose to give anu client a privillage of closing the whole db while other clients might be still connected???

See this duscussion about implementing Data.close().
Eugene.
 
Stephen Gargan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could throw an exception back to your client saying that there are other clients using the database and only allow a close if you are the only client.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!