[freetds] dblib bcp & freebcp

Thompson, Bill D (London) bill_d_thompson at ml.com
Thu Jun 3 07:00:42 EDT 2004


James,

> Yay!  How did you work around the fseek() in "measuring" delimited
character files?  

I'm afraid you caught me out. I was planning to the stdin/stdout work today,
I thought it would be easy.
Just do this, right ?

    FILE *fptr;

    if (strcmp(filename,"stdin") == 0 ) {
        fptr = stdin;
    } else {
        fptr = fopen(filename, "r");
    }

Ah well....

I'll take a look at bcp_moretext(). It should be possible.

Bill


> -----Original Message-----
> From:	Lowden, James K [SMTP:LowdenJK at bernstein.com]
> Sent:	02 June 2004 17:52
> To:	FreeTDS Development Group
> Subject:	RE: [freetds] dblib bcp & freebcp
> 
> > From: freetds-bounces at lists.ibiblio.org
> > [mailto:freetds-bounces at lists.ibiblio.org]On Behalf Of 
> > Thompson, Bill D
> > (London)
> > Sent: June 2, 2004 12:05 PM
> > 
> > I'm just finishing up my reworking of the dblibrary bcp api, 
> > retro-fitting
> > the improvements to the processing that I put into the ct-lib 
> > blk library.
> 
> Cool!  
> 
> Loading some files recently, we noticed that Microsoft's and Sybase's bcp
> libraries both trim trailing blanks from char & varchar character data.
> You can stuff 16 characters into a char(8) if the last 8 characters are
> consistently blanks.  
> 
> I had fixed bcp.c to handle the varchar case some time back; I added char
> last week.    
> 
> > the -E flag (as supported by Microsoft's version) which allows you to
> > control the behaviour with respect to identity columns.
> ...
> > the handling of timestamp columns, as documented in 
> > Microsoft's version
> 
> These will both be welcome, especially timestamp.  
> 
> > the "queryout" method, as supported by Microsoft's version, 
> > which allows you
> > to specify a query (or I guess the exec of a stored 
> > procedure) as the source
> > of a "bcp out" operation
> 
> Very nice.  (Yes, "exec <proc>" should work.)
> 
> > the specification of "stdout" or "stdin" as the output/input 
> > file (that's an enhancement on both Sybase & MS's version)
> 
> Yay!  How did you work around the fseek() in "measuring" delimited
> character files?  
> 
> > before I submit my patch, is there anything else anyone is 
> > desperate for ?
> 
> bcp_moretext()?  ;-)  Of course, it's the only missing bcp function.  I
> don't know what the protocol implications are; I don't know if this
> out-of-order data handling is only a db-lib feature, or if the server can
> somehow accept text data after the rest of the row data.  
> 
> Looking forward to you patch, Bill.  Thanks for working on this.  
> 
> --jkl
> 
> -----------------------------------------
> The information contained in this transmission may contain privileged and
> confidential information and is intended only for the use of the person(s)
> named above. If you are not the intended recipient, or an employee or
> agent responsible for delivering this message to the intended recipient,
> any review, dissemination, distribution or duplication of this
> communication is strictly prohibited. If you are not the intended
> recipient, please contact the sender immediately by reply e-mail and
> destroy all copies of the original message. Please note that we do not
> accept account orders and/or instructions by e-mail, and therefore will
> not be responsible for carrying out such orders and/or instructions.
> If you, as the intended recipient of this message, the purpose of which is
> to inform and update our clients, prospects and consultants of
> developments relating to our services and products, would not like to
> receive further e-mail correspondence from the sender, please "reply" to
> the sender indicating your wishes.  In the U.S.: 1345 Avenue of the
> Americas, New York, NY 10105.
> 
> 
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds

==============================================================================

If you are not an intended recipient of this e-mail, please notify
the sender, delete it and do not read, act upon, print, disclose,
copy, retain or redistribute it.

Click here for important additional terms relating to this e-mail.
     <http://www.ml.com/email_terms/>

==============================================================================




More information about the FreeTDS mailing list