~ seperated values from .txt file

Results 1 to 3 of 3

Thread: ~ seperated values from .txt file

  1. #1
    Join Date
    Dec 1969

    Default ~ seperated values from .txt file

    Hi Friends!<BR><BR><BR>I have one MS Access DB from where I am querying data when an employee ID is passed at the same time I have a .txt file in which<BR>there is some more data which looks like this...I have a field emp_loc in the table what I need to do is..if emp_loc is IND then<BR>from the textfile which contains data that looks like the one below values seperated by ~<BR>I need to populate a selectbox in my asp page with the values after the second ~ for IND<BR><BR><BR>ht_mail_id_2003053001215981.29832~I ND~ORACLE 9I~9960~E710404~50082~01-17-94-00/10<BR>~Service~<BR>ht_mail_id_2003053001215981.298 32~KOR~JAVA~9960~E710404~50082~01-17-94-00/10<BR>~Service<BR>ht_mail_id_2003053001263900.2849 3~IND~ASP~9960~E710404~50082~01-17-94-00/10<BR>~Service<BR>ht_mail_id_2003053001351375.0988 6~CH~ASP~9960~E710404~50082~01-17-94-00/10<BR>~Moderate<BR><BR><BR>Any help will be greatly appreciated..<BR><BR>Regards

  2. #2
    Join Date
    Dec 1969

    Default Can't you just import the text file...

    ...into your database? That would be easiest. Otherwise you would have to write code to read in the file line by line and then split() the line into fields.<BR><BR>Oliver.

  3. #3
    Join Date
    Dec 1969

    Default RE: ~ seperated values from .txt file

    If you are familiar with the FileSystemObject? Just ReadAll from the text File then you will need *two* Split Functions, First one to split each line using VBCrLf as your delimiter and the second split function using the "~" as the delimiter. Once it is split just use the array to populate the select box if you have a match.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts