|
|
 | | From: | Robin Read | | Subject: | Re: OLH | | Date: | Mon, 29 Nov 2004 14:12:24 -0400 |
|
|
 | Thanks for humoring me/my post. Now that you've replied, I guess I'll have to make it serious, ;-) I have found the wish-list group and I'll post this there with your great suggestions....I too have encountered some of those same problems you detailed.
Here goes... COPY TO [] [FOR ] [WHILE ] [FIELDS ] [[TYPE] DBASE | DBMEMO3 | PARADOX | SDF | ********************************* DELIMITED [WITH bracket delimted var...(var), or a macro...&cMacro. Default is double quote.> | BLANK SEPARATED [WITH bracket delimted var...(var), or a macro...&cMacro. Default is comma.> | BLANK ] EOL [WITH delimted var...(var), or a macro...&cMacro. Default is the combination of chr(13)+chr(10)> | NOBLANKLINE ] ] ] | ********************************* [[WITH] PRODUCTION]
The NOBLANKLINE means that the last line of data has no chr(13)+chr(10) appended to the end of it. That is, it'll have the EOF marker at that point. Without NOBLANKLINE, the default behavior will persist. Also, notice that all previous "WITH have been replaced with "WITH there a string of any length as long as it is a variable in brackets of a macro substituted string. That should take care of your "chr(9)" issue.
Enjoy, Robin
"Ivar B. Jessen" wrote in message news:rjueq0pt25ktd1f0ba2rlfs080h637m6aj@4ax.com... > Fri, 26 Nov 2004 13:24:35 -0400 chr(10) dbase.bug-reports chr(10)Re: > OLH chr(10) "Robin Read" chr(10) > > > >This is what I'd like to see... > >...From the OLH and with the parts that I've > >modified and added between the lines of > >asterisks... > >COPY TO > >[] > >[FOR ] > >[WHILE ] > >[FIELDS ] > >[[TYPE] DBASE | DBMEMO3 | PARADOX | SDF | > >********************************* > > DELIMITED [WITH > >bracket delimted var...(var), or a > >macro...&cMacro. Default is double quote.> | > >BLANK > >SEPARATED [WITH > >bracket delimted var...(var), or a > >macro...&cMacro. Default is comma.> | > >BLANK ] ] ] | > >********************************* > >[[WITH] PRODUCTION] > > > >Notice that the defaults stay in place...as they > >must to maintain backward compatibility. > >This sort of idea should be aplied to APPEND FROM > >also. > > > >I was gonna' post this idea to the Wish List, > >but where did it go? > > Robin, > > When you post the idea in the wish list could you include the > following, > > Stress that the separating character can be a TAB chr(9). > > There should be an optional parameter for the line endings. > Presently they are always 0x0d0A, Linux requires something > different. > > There should be an optional parameter for the last (text) line. > At the present COPY Fish.dbf to Fishtail.txt DELIMITED results in a > last (text) line ending in 0x0D0A followed by a line consisting of the > end of file marker 0x1A. That last line ending 0x0D0A is not needed at > all and the end of file marker 0x1A is even less needed, it just leads > to endless problems. > > > Ivar B. Jessen
|
|
 | | From: | Ivar B. Jessen | | Subject: | Re: OLH | | Date: | Mon, 29 Nov 2004 22:41:42 +0100 |
|
|
 | Mon, 29 Nov 2004 14:12:24 -0400 chr(10) dbase.wishlist chr(10)Re: OLH chr(10) "Robin Read" chr(10)
>Thanks for humoring me/my post. >Now that you've replied, I guess I'll have to make >it serious, ;-) >I have found the wish-list group and I'll post >this there with your >great suggestions....I too have encountered some >of those same >problems you detailed.
Great! While you are waiting for the whish to come true you could try the code below. Watch for word wrap.
Ivar B. Jessen
//----- #define adCmdText 1 #define adClipString 2
con=new oleautoclient( "ADODB.Connection") con.open("Driver={Microsoft dBase Driver (*.dbf)};DBQ=D:\programmer\dbase\plus221\samples;DriverID=533")
rst = new oleautoclient( "ADODB.Recordset" ) rst.open('select ID, Name, Species, "Length CM" from Fish', con, adCmdText)
? rst.getstring(adClipString, rst.recordCount, ";", ";'<--- Line ends here'"+ chr(13))
release object rst; release rst release object con; release con //-----
|
|
|