943,929 Members | Top Members by Rank

Ad:
Apr 23rd, 2009
0

help

Expand 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.
Reputation Points: 3
Solved Threads: 5
Posting Whiz in Training
ryan311 is offline Offline
254 posts
since Jul 2008
Apr 25th, 2009
0

Re: help

I don't quite understand your question. Could you rephrase it once again in a little more detail?
Reputation Points: 26
Solved Threads: 4
Junior Poster in Training
nexocentric is offline Offline
62 posts
since Mar 2009
Apr 26th, 2009
0

Re: help

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
Reputation Points: 156
Solved Threads: 296
Posting Virtuoso
vb5prgrmr is offline Offline
1,670 posts
since Mar 2009
Apr 27th, 2009
0

Re: help

Click to Expand / Collapse  Quote originally posted by ryan311 ...
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
Reputation Points: 11
Solved Threads: 10
Junior Poster in Training
c0deFr3aK is offline Offline
71 posts
since Mar 2009
Apr 27th, 2009
0

Re: help

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.
Reputation Points: 3
Solved Threads: 5
Posting Whiz in Training
ryan311 is offline Offline
254 posts
since Jul 2008

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 Visual Basic 4 / 5 / 6 Forum Timeline: visual basic
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: How do i want to create random number for dynamic array variables ?





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


Follow us on Twitter


© 2011 DaniWeb® LLC