[freetds] BCP In of data too large fails [NC]

Cedric ROUVRAIS cedric.rouvrais at sgcib.com
Sun Aug 23 20:21:00 EDT 2009


Hi james,

If ansi warnings are set to off then the result of a bcp in should be a
truncation when the data is to large for the destination column.  Sybase
bcp works like this for sure, so I added the feature in freebcp.c

It makes things easier for people who are moving from Sybase to SQL Server.

a++ Cedric



|------------------------------                                            
|            "James K. Lowden"                                             
|            <jklowden at freetds                                             
|            .org>                                                         
|            Sent by:                                                      
|            freetds-bounces at l                                             
|            ists.ibiblio.org                                              
|                                                                          
|                                                                          
|            08/23/2009 05:08                                              
|            PM                                                            
|                                                                          
|                                                                          
|            Please respond to                                             
|                 FreeTDS                                                  
|            Development Group                                             
|            <freetds at lists.ib                                             
|               iblio.org>                                                 
|                                                                          
|                                                                          
                                                                           
                                                                           
                                                                        To 
                                               FreeTDS Development Group   
                                               <freetds at lists.ibiblio.org> 
                                                                        cc 
                                                                           
                                                                   Subject 
                                               Re: [freetds] BCP In of     
                                               data too large fails [NC]   
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Cedric ROUVRAIS wrote:
>
> Starting copy...
> dblib error: The result is truncated because the conversion/operation
> resulted in overflow. Source data "RDJF TFS CRE -
> AdvisedExportLetterOfCredit" should not exceed 32 chars.
> 1 rows copied.

You can't put 10 pounds of flour in a 5-pound bag.  If your data in the
file are longer than fit in the column, don't you expect an error?

Or what's the question?

--jkl



_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds



*************************************************************************
This message and any attachments (the "message") are confidential, intended 
solely for the addressee(s), and may contain legally privileged information.  
Any unauthorised use or dissemination is prohibited.  E-mails are susceptible 
to alteration.  Neither SOCIETE GENERALE nor any of its subsidiaries or 
affiliates shall be liable for the message if altered, changed or falsified.
*************************************************************************



More information about the FreeTDS mailing list