dbTalk Databases Forums  

Pdox DOS import problem

comp.databases.paradox comp.databases.paradox


Discuss Pdox DOS import problem in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Pdox DOS import problem - 03-06-2008 , 09:45 AM






I've got a txt file with fields delimited by commas. One field contains
product descriptions, and many have words enclosed in quotation marks. When
using Tools, Import, Ascii, Delimited, Pdox has problems with records
containing those quotation mark-affected words. So, the import never
proceeds. I could do a search-replace on the txt file and remove all the
quotation marks, but that presents another problem: Some descriptions also
contain stuff like

paper plates 10"

....where that 10 inch designation is important, so I don't want to remove
ALL quotation marks.

How do I tell Pdox to ignore quotation marks completely during the import,
and focus only on the commas? I seem to recall a way of adjusting import
parameters, but it's been too long since I did this. I see nothing in the
menus.



Reply With Quote
  #2  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Re: Pdox DOS import problem - 03-06-2008 , 09:52 AM






"JoeSpareBedroom" <dishborealis (AT) yahoo (DOT) com> wrote

Quote:
I've got a txt file with fields delimited by commas. One field contains
product descriptions, and many have words enclosed in quotation marks.
When using Tools, Import, Ascii, Delimited, Pdox has problems with records
containing those quotation mark-affected words. So, the import never
proceeds. I could do a search-replace on the txt file and remove all the
quotation marks, but that presents another problem: Some descriptions also
contain stuff like

paper plates 10"

...where that 10 inch designation is important, so I don't want to remove
ALL quotation marks.

How do I tell Pdox to ignore quotation marks completely during the import,
and focus only on the commas? I seem to recall a way of adjusting import
parameters, but it's been too long since I did this. I see nothing in the
menus.


OK - found the options screen (CUSTOM). Shows string delimiter as a
quotation mark. Won't accept a blank value, and changing it to a comma has
no effect on the situation.




Reply With Quote
  #3  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Re: Pdox DOS import problem - 03-06-2008 , 09:52 AM



"JoeSpareBedroom" <dishborealis (AT) yahoo (DOT) com> wrote

Quote:
I've got a txt file with fields delimited by commas. One field contains
product descriptions, and many have words enclosed in quotation marks.
When using Tools, Import, Ascii, Delimited, Pdox has problems with records
containing those quotation mark-affected words. So, the import never
proceeds. I could do a search-replace on the txt file and remove all the
quotation marks, but that presents another problem: Some descriptions also
contain stuff like

paper plates 10"

...where that 10 inch designation is important, so I don't want to remove
ALL quotation marks.

How do I tell Pdox to ignore quotation marks completely during the import,
and focus only on the commas? I seem to recall a way of adjusting import
parameters, but it's been too long since I did this. I see nothing in the
menus.


OK - found the options screen (CUSTOM). Shows string delimiter as a
quotation mark. Won't accept a blank value, and changing it to a comma has
no effect on the situation.




Reply With Quote
  #4  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Re: Pdox DOS import problem - 03-06-2008 , 09:52 AM



"JoeSpareBedroom" <dishborealis (AT) yahoo (DOT) com> wrote

Quote:
I've got a txt file with fields delimited by commas. One field contains
product descriptions, and many have words enclosed in quotation marks.
When using Tools, Import, Ascii, Delimited, Pdox has problems with records
containing those quotation mark-affected words. So, the import never
proceeds. I could do a search-replace on the txt file and remove all the
quotation marks, but that presents another problem: Some descriptions also
contain stuff like

paper plates 10"

...where that 10 inch designation is important, so I don't want to remove
ALL quotation marks.

How do I tell Pdox to ignore quotation marks completely during the import,
and focus only on the commas? I seem to recall a way of adjusting import
parameters, but it's been too long since I did this. I see nothing in the
menus.


OK - found the options screen (CUSTOM). Shows string delimiter as a
quotation mark. Won't accept a blank value, and changing it to a comma has
no effect on the situation.




Reply With Quote
  #5  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Re: Pdox DOS import problem - 03-06-2008 , 09:52 AM



"JoeSpareBedroom" <dishborealis (AT) yahoo (DOT) com> wrote

Quote:
I've got a txt file with fields delimited by commas. One field contains
product descriptions, and many have words enclosed in quotation marks.
When using Tools, Import, Ascii, Delimited, Pdox has problems with records
containing those quotation mark-affected words. So, the import never
proceeds. I could do a search-replace on the txt file and remove all the
quotation marks, but that presents another problem: Some descriptions also
contain stuff like

paper plates 10"

...where that 10 inch designation is important, so I don't want to remove
ALL quotation marks.

How do I tell Pdox to ignore quotation marks completely during the import,
and focus only on the commas? I seem to recall a way of adjusting import
parameters, but it's been too long since I did this. I see nothing in the
menus.


OK - found the options screen (CUSTOM). Shows string delimiter as a
quotation mark. Won't accept a blank value, and changing it to a comma has
no effect on the situation.




Reply With Quote
  #6  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Re: Pdox DOS import problem - 03-06-2008 , 09:52 AM



"JoeSpareBedroom" <dishborealis (AT) yahoo (DOT) com> wrote

Quote:
I've got a txt file with fields delimited by commas. One field contains
product descriptions, and many have words enclosed in quotation marks.
When using Tools, Import, Ascii, Delimited, Pdox has problems with records
containing those quotation mark-affected words. So, the import never
proceeds. I could do a search-replace on the txt file and remove all the
quotation marks, but that presents another problem: Some descriptions also
contain stuff like

paper plates 10"

...where that 10 inch designation is important, so I don't want to remove
ALL quotation marks.

How do I tell Pdox to ignore quotation marks completely during the import,
and focus only on the commas? I seem to recall a way of adjusting import
parameters, but it's been too long since I did this. I see nothing in the
menus.


OK - found the options screen (CUSTOM). Shows string delimiter as a
quotation mark. Won't accept a blank value, and changing it to a comma has
no effect on the situation.




Reply With Quote
  #7  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Re: Pdox DOS import problem - 03-06-2008 , 09:52 AM



"JoeSpareBedroom" <dishborealis (AT) yahoo (DOT) com> wrote

Quote:
I've got a txt file with fields delimited by commas. One field contains
product descriptions, and many have words enclosed in quotation marks.
When using Tools, Import, Ascii, Delimited, Pdox has problems with records
containing those quotation mark-affected words. So, the import never
proceeds. I could do a search-replace on the txt file and remove all the
quotation marks, but that presents another problem: Some descriptions also
contain stuff like

paper plates 10"

...where that 10 inch designation is important, so I don't want to remove
ALL quotation marks.

How do I tell Pdox to ignore quotation marks completely during the import,
and focus only on the commas? I seem to recall a way of adjusting import
parameters, but it's been too long since I did this. I see nothing in the
menus.


OK - found the options screen (CUSTOM). Shows string delimiter as a
quotation mark. Won't accept a blank value, and changing it to a comma has
no effect on the situation.




Reply With Quote
  #8  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Re: Pdox DOS import problem - 03-06-2008 , 09:52 AM



"JoeSpareBedroom" <dishborealis (AT) yahoo (DOT) com> wrote

Quote:
I've got a txt file with fields delimited by commas. One field contains
product descriptions, and many have words enclosed in quotation marks.
When using Tools, Import, Ascii, Delimited, Pdox has problems with records
containing those quotation mark-affected words. So, the import never
proceeds. I could do a search-replace on the txt file and remove all the
quotation marks, but that presents another problem: Some descriptions also
contain stuff like

paper plates 10"

...where that 10 inch designation is important, so I don't want to remove
ALL quotation marks.

How do I tell Pdox to ignore quotation marks completely during the import,
and focus only on the commas? I seem to recall a way of adjusting import
parameters, but it's been too long since I did this. I see nothing in the
menus.


OK - found the options screen (CUSTOM). Shows string delimiter as a
quotation mark. Won't accept a blank value, and changing it to a comma has
no effect on the situation.




Reply With Quote
  #9  
Old   
Tony McGuire
 
Posts: n/a

Default Re: Pdox DOS import problem - 03-06-2008 , 10:26 AM




Paradox doesn't like unmatched single quotes, or quotes within data
regardless of whether you tell it that quotes are delimiters.

I get around it by creating my own import routines. Fortunately, the
data I get is separated with tabs rather than commas. Commas can also
appear as separators, which can make life hard.

I use tcursors, and read the data with a textstream into an array.
Then do a breakapart on the tabs after applying the below.
==================================
; y is the array element number being processed
; k is arbitrary; I know it is high enough
; to ensure all elements are tested, and array elements created.
for k from 1 to 50
try
if match(arRead[y],"..\t\t..",aa,ab) then
arRead[y]=aa+"\t \t"+ab
else
quitloop
endif
onFail
arRead[y].view()
return False
endTry
endfor
==================================

The above looks for adjoining tabs, which indicate that there is a
blank field there. So I replace double tabs with {tab}{space}{tab},
which gives me blank array values rather than missing array elements
(a limitation of the breakapart function).

You should be able to replace the \t with commas; although it may
require some work since I believe commas are special instructions to
MATCH.









--
------------------------------
Tony McGuire




Reply With Quote
  #10  
Old   
Tony McGuire
 
Posts: n/a

Default Re: Pdox DOS import problem - 03-06-2008 , 10:26 AM




Paradox doesn't like unmatched single quotes, or quotes within data
regardless of whether you tell it that quotes are delimiters.

I get around it by creating my own import routines. Fortunately, the
data I get is separated with tabs rather than commas. Commas can also
appear as separators, which can make life hard.

I use tcursors, and read the data with a textstream into an array.
Then do a breakapart on the tabs after applying the below.
==================================
; y is the array element number being processed
; k is arbitrary; I know it is high enough
; to ensure all elements are tested, and array elements created.
for k from 1 to 50
try
if match(arRead[y],"..\t\t..",aa,ab) then
arRead[y]=aa+"\t \t"+ab
else
quitloop
endif
onFail
arRead[y].view()
return False
endTry
endfor
==================================

The above looks for adjoining tabs, which indicate that there is a
blank field there. So I replace double tabs with {tab}{space}{tab},
which gives me blank array values rather than missing array elements
(a limitation of the breakapart function).

You should be able to replace the \t with commas; although it may
require some work since I believe commas are special instructions to
MATCH.









--
------------------------------
Tony McGuire




Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.