Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 26th, 2003, 05:59 AM
hamfiles hamfiles is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Near Seattle
Posts: 11 hamfiles User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old November 26th, 2003, 08:35 AM
Fisherman's Avatar
Fisherman Fisherman is offline
Inherits Programmer.Slacker
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2003
Location: Between my Id and your Ego
Posts: 2,179 Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 10 h 3 sec
Reputation Power: 111
Send a message via ICQ to Fisherman Send a message via AIM to Fisherman
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

Reply With Quote
  #3  
Old November 26th, 2003, 10:13 AM
hamfiles hamfiles is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Near Seattle
Posts: 11 hamfiles User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old November 26th, 2003, 11:35 AM
Fisherman's Avatar
Fisherman Fisherman is offline
Inherits Programmer.Slacker
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2003
Location: Between my Id and your Ego
Posts: 2,179 Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 10 h 3 sec
Reputation Power: 111
Send a message via ICQ to Fisherman Send a message via AIM to Fisherman
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.

Reply With Quote
  #5  
Old November 26th, 2003, 02:39 PM
hamfiles hamfiles is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Near Seattle
Posts: 11 hamfiles User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
OK, Thanks for the info.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Multiple user inputs to 1 File in Sequence Possible?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT