|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Multiple user inputs to 1 File in Sequence Possible?
Where I work it would be helpful to have a form w/ input box or similar field to allow multiple (4 of us) users on a network to write to a texfile simulaneously, and have the results inputted/threaded into a form sequentially, according to a time entered in input box.
My question is, can VB thread multiple entrys together, and sort the entries by a time stamp or sequence number, into one file? I don't mind studying to develop the code on my own, just want to know, is this possible in Visual Basic? Thanks, Hamfiles |
|
#2
|
||||
|
||||
|
I guess it's possible. You'd have to have a string to hold the last "known" contents of the text file, and then poll every once in a while (maybe with a timer) to see if that text file had changed or not. If it has, then update your screen?
__________________
Fisherman "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein |
|
#3
|
|||
|
|||
|
Thanks for the info, Fisherman. I don't think I was very clear as to everything that I'm trying to do. Do you know if there is a way in VB to weave inputs from different users and sort them by time?
here is a pseudo-code example: date>>> Time>>>>>>>>> Info>>>>>>>>>> Initials 112603 8:55 User A info "Incident info" init: (user a initials) 112603 8:56 User B info "Incident info" init: (user b initials) 112603 8:57 User C info "Incident info" init: (user c initials) In other words, as each user enters their data, I'd like VB to sort the entries to the form by time that the incident occured as indicated by the user, not the time the entry was made. So as the data is written to the form on network drive, the program would need to check the entries in the "time" field, and insert the new entry in the appropriate place by the Time stated by user. For instance, if user "B" above, did not enter the data until after 9:00 o'clock, and user "A and user "C" already had their entries inputted, I would like user "B's" 8:56 entry to be "threaded" between the 8:55 and 8:57 entries. For this example, is there a way to tell the form to enter the 8:56 entry after 8:55, and before 8:57? Or, is there a way to have the form sort the entries in sequence by one specific field like time or a numeric field, maybe with a cmd button? I'm kinda new to VB, but this would help out alot if it could be done. At work we are looking for a way to turn 4 separate data bases into one centralized one. I can program the form, but I'm not sure if Visual Basic code alone can sort the fields. Thanks again for your response, Fisherman, any replies to this are greatly appreciated. -Hamfiles- Last edited by hamfiles : November 26th, 2003 at 10:19 AM. |
|
#4
|
||||
|
||||
|
well.. Ham.. it can be done. I have no doubt about that. So long as all users "client" applications are pointing to the same log file(text). What you're talking about is not so much about "threading" the data as it is about sorting the data once you have it in your application. If that's the case, then write the users' application that adds data to the text file such that it will include a date/time stamp. Then use that date time stamp to sort your data whenever your program determines that the central log has changed.
|
|
#5
|
|||
|
|||
|
OK, Thanks for the info.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Multiple user inputs to 1 File in Sequence Possible? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|