Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Compiled Languages > Visual Basic   »   Importing complex delimited text

Answer this Question
Ask about Visual Basic
 
Question Tools Search this Question Display Modes
Question
 
 
#1  
Old Nov 16, 2003, 09:30 AM
alexbrown61
New Member
alexbrown61 is offline
 
Join Date: Nov 2003
Location:
Posts: 1
alexbrown61 See this member's comment history on his/her Profile page.
Send a message via ICQ to alexbrown61
Importing complex delimited text

I get a daily email message that looks like this ???(abbreiviated):

(MESSAGE 1)
AOCDX/PP/TS/312 1756Z//
OPSID/DTR//12345/NOTHING HERE/
ACTI/12/ROUND ABOUT INFORMATION/
COMTECT/123.987MHZ/W9ASG3546/KJDFKAJSDFKD/
RMKS/ THIS IS JUST A REMARK/
LOC/11232E 112344S/
DATETIME/ 1234Z MAR 03//

(MESSAGE 2)
AOCDX/PP/TS/312 1758Z//
OPSID/AFR/56789/SOMETHING HERE/
COMTECT/1234HZ/WRWE987R87W/SDFKJHSADJHSA/
RMKS/THIS IS JUST A REMARK/
CMNT/THIS IS JUST A COMMENT/
LOC/11232E 112344N/
TRK/11232E 112344N/11232E 11245N/11232E 11246N/
DATETIME/1234Z APR 03//

How can I use automation and VB to get this into a useable Access table?

I can get it imported into a blank table but the table is so scranbled that it is not useful. Thanks for any help you can provide.

Alexus

Reply With Quote
 
     

Answers
 
 
Old Nov 26, 2003, 08:00 AM   #2  
tadds
New Member
tadds is offline
 
Join Date: Nov 2003
Location: New York
Posts: 10
tadds See this member's comment history on his/her Profile page.
Send a message via ICQ to tadds
Re: Importing complex delimited text

OK I would suggest you define a series of tables. One for each record type that you receive in a single message. This seems the be the first token of each line in the message. Define columns for these tables to hold the various values you receive on each line. This way each row of information will have a unique column in its matching table. Have the datetime be a common column in each table and filled with the DATETIME value from each message. This way you can join all related message information on datetime. As for reading and parsing the message, check out the SPLIT() function in VB. Your tablename will be at index 0.

Enjoy!
  Reply With Quote
 
     
Answer this Question
Ask about Visual Basic


Question Tools Search this Question
Search this Question:

Advanced Search
Display Modes

 
Similar Sponsors

Similar Questions
Question Asker Topic Answers Last Post
2 complex Sugar sweet Dating 4 Dec 24, 2005 05:45 AM
complex integral asder Mathematics 0 Nov 20, 2005 02:16 AM
importing email messages autumneve Other Software 3 Oct 20, 2005 10:12 PM
An Integral (Complex) amir parsa Mathematics 2 Mar 15, 2005 04:35 PM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 03:03 AM.

Content Relevant URLs by vBSEO 3.0.0 RC6 © 2006, Crawlability, Inc.