| | |
![]() |
•
•
Join Date: Jul 2008
Posts: 161
Reputation:
Solved Threads: 1
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.
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.
•
•
Join Date: Mar 2009
Posts: 807
Reputation:
Solved Threads: 147
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
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
Thanks
•
•
•
•
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.
tnx
"Remember your creator before you die"
•
•
Join Date: Jul 2008
Posts: 161
Reputation:
Solved Threads: 1
this is my connection to my database
please help me about the time.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Public Sub conn() Set cn = New ADODB.Connection cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\attendance.mdb;Persist Security Info=False" End Sub
please help me about the time.
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: visual basic
- Next Thread: How do i want to create random number for dynamic array variables ?
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





