Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
How to make code run differently depending on the platform it is running on?
xarzu - Apr 05 2019 09:17 AM
How do I set a breakpoint in an attached process in visual studio
xarzu - Apr 04 2019 11:47 AM
Recent Blog Entries
Recent Status Updates
- Managed C++
- Visual Basic 4 / 5 / 6
- linked list
- hello world
Posted 19 December 2012 - 07:20 AM
I've tried many times but still it fails to show the statement 'Sorry! You are under 18 so cannot join this voting event.'
Also, the ID numbers that entered won't save into the text file. The voting record won't be updated if success entering the correct data.
Can anyone help me? urgent! Thanks a lot!
Posted 21 December 2012 - 07:20 AM
id.txt is a text file which stores id numbers.
Here's some examples for valid id numbers: F1234567, A2041637
In the program code, the procedure which named "InsertID", is used to insert the ID numbers which satisfy the requirement of ID number.
However, it cannot save any ID numbers after entering the valid ID numbers and quit the program.
How can I fix these problems?
Thanks for your help!
Edited by rrwe, 21 December 2012 - 07:20 AM.
Posted 21 December 2012 - 10:35 AM
Looked like you assumed that the result of prior AssignFile you called in OpenOrCreateDB2 will be maintained after a call to Close - you did this in InputID. But it does not. After you Close a file, the relationship between a file variable and the "real" file will be terminated. So you need to AssignFile again.
Edited by LuthfiHakim, 21 December 2012 - 10:37 AM.