Connecting to Text-Delimited Database Files on the

Results 1 to 3 of 3

Thread: Connecting to Text-Delimited Database Files on the

  1. #1
    Join Date
    Dec 1969

    Default Connecting to Text-Delimited Database Files on the

    Hi!<BR> <BR> <BR>I read your article at:<BR> <BR><BR> <BR>While your code works with YOUR datafile, I found out that<BR>your code does not work with the following datafile:<BR> <BR> <BR>"FirstName","Phone","Phone2","Fax","Balance"<B R>Greg,818-555-9999,818-555-9999,818-556-1234,100000 <BR>Greg,818-555-9999,8185559999, 8185561234,100001 <BR>Greg,818-555-9999,8185559999,8185561234,100002<BR>John,919-555-0000,3105541221,3105561234,150000 <BR>Sally,555-222-MAIN,3105551223,3105561234,120000<BR>Barry,555-444-333,3105551245,310-556-1234,115000<BR>Gabby,main-555-444,3105551266,3105561234,111000<BR>Harrold,310-555-9000,3105551277,3105561234,100000<BR> <BR> <BR> <BR> <BR>Do you know why some of hte phone numbers are missing<BR>when you run the code? This is very perplexing!<BR> <BR>Gregory<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Who is YOUR???

    Who wrote the article? Is he/she still a poster here?<BR><BR>After all, that article was written March 8, 1999, almost 3 years ago. <BR><BR>Do you want an answer from the author? Email him/her.<BR><BR>Do you want an answer from anybody?<BR><BR>If I were *guessing* I would say it is because you don&#039;t have quotes around the phone numbers and, since the first line looks like numbers instead of text, the text driver tries to treat all of them as numbers. Which obviously doesn&#039;t work.<BR><BR>Using a CSV db without putting "..." around strings is kind of playing a guessing game with the driver.<BR><BR>You *MIGHT* solve it simply by putting in a dummy first record, thus:<BR><BR>"FirstName","Phone","Phone2","Fax","B alance"<BR>"ignore","ignore","ignore",0.0<BR>Greg, 818-555-9999,818-555-9999,818-556-1234,100000 <BR>...<BR><BR>That *should* force the driver to treat the first three fields as text, instead of numbers, and the last one as a number.<BR><BR>Then, whey you process the records, just do a MOVENEXT *before* you start working with the data.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default call us when your shuttle lands <nm>


Posting Permissions

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