Reply

Join Date: Jul 2008
Posts: 161
Reputation: ryan311 has a little shameless behaviour in the past 
Solved Threads: 1
ryan311 ryan311 is offline Offline
Junior Poster

help

 
0
  #1
Apr 23rd, 2009
help please, how to save a data between the time of what user input in the 2 textbox. 1 textbox is for intime and the 2 one is out time.

for example if the user input

7:30 - 9:30 Am Intime

all i want is this is the only time that the user can save a data into a database. if the time will come to 9:31 this is the time that the user cannot add anymore. the user can only add a data between 7:30 - 9:30 AM please help. badly needed.
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 53
Reputation: nexocentric is an unknown quantity at this point 
Solved Threads: 4
nexocentric nexocentric is offline Offline
Junior Poster in Training

Re: help

 
0
  #2
Apr 25th, 2009
I don't quite understand your question. Could you rephrase it once again in a little more detail?
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 807
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 147
vb5prgrmr vb5prgrmr is offline Offline
Practically a Posting Shark

Re: help

 
0
  #3
Apr 26th, 2009
So you want to limit access to the database based on access times. Well then, you will need some sort of table in the database that contains the user and the start/stop access times. Then at program start you would query for this information plus you would need to query a machine other than the users machine for what time it is via the netremotetod API....

http://support.microsoft.com/kb/249716/EN-US/

However, since you can see that is in C you will need to convert it to VB (Good Luck).

Now, this will only tell you at program startup if the user has the right to access the database and if they don't you should end the program with an informative message of not yet or time expired.

But, once the program is running you will need to occasionally check the machine you have designated as your time server. Hopefully, you will pick a machine that is not to busy and you may need to ask you network admin on which machine you should point this api to. So, you could check via the api prior to updates to see if the user has permissions.

Now, the reason I am pointing you to this fairly difficult API is because it is a very simple task for the user to change the time on their computer but if you have your code pointed at a machine they cannot get their hands on, well then, you will be keeping them honest.

Good Luck
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 66
Reputation: c0deFr3aK is an unknown quantity at this point 
Solved Threads: 10
c0deFr3aK's Avatar
c0deFr3aK c0deFr3aK is offline Offline
Junior Poster in Training

Re: help

 
0
  #4
Apr 27th, 2009
Originally Posted by ryan311 View Post
help please, how to save a data between the time of what user input in the 2 textbox. 1 textbox is for intime and the 2 one is out time.

for example if the user input

7:30 - 9:30 Am Intime

all i want is this is the only time that the user can save a data into a database. if the time will come to 9:31 this is the time that the user cannot add anymore. the user can only add a data between 7:30 - 9:30 AM please help. badly needed.
Please supply your current code including your connection to the database so that it would be easy to find solution to your problem.

tnx
"Remember your creator before you die"
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 161
Reputation: ryan311 has a little shameless behaviour in the past 
Solved Threads: 1
ryan311 ryan311 is offline Offline
Junior Poster

Re: help

 
0
  #5
Apr 27th, 2009
this is my connection to my database

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Public Sub conn()
  2. Set cn = New ADODB.Connection
  3. cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\attendance.mdb;Persist Security Info=False"
  4. End Sub

please help me about the time.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC