[freetds] Having trouble doing a BULK INSERT

Wes Gamble weyus at att.net
Mon Nov 6 11:55:33 EST 2006


I just found freebcp - is this the correct/only way to do bulk inserts 
using freetds?

Thanks,
Wes

Wes Gamble wrote:

>All,
>
>Mandriva Linux 10.x
>freetds 0.64
>
>I'm attempting to perform a BULK INSERT into a SQL Server table.
>I created a table named "westest" with one column in it, that's a char(10).
>
>The output that I get when I attempt to BULK INSERT a valid file that 
>exists in the local directory is below - it's saying that the file 
>doesn't exist.  However, this file exists in the local directory with 
>permissions set to 666. 
>
>Is there something I'm missing here - does freetds support the use of 
>BULK INSERT?
>
>Thanks,
>Wes
>
>================= Output of test ====================
>
>[dusan at exmit2 lists]$ tsql -H DBServe -p 1433 -U webuser -P webusercb
>locale is "en_US"
>locale charset is "ISO-8859-1"
>1> BULK INSERT dbo.westest FROM 'data'
>2> go
>Msg 4860, Level 16, State 1, Server DBSERVE, Line 1
>Could not bulk insert. File 'data' does not exist.
>1>
>
>===============  Data file ===========================
>
>[dusan at exmit2 lists]$ cat data
>jsdf
>lkajdsf
>lkajdf
>lkajdsf
>lkajf
>wpoieur
>oiwur
>wer
>
>
>
>_______________________________________________
>FreeTDS mailing list
>FreeTDS at lists.ibiblio.org
>http://lists.ibiblio.org/mailman/listinfo/freetds
>
>  
>


More information about the FreeTDS mailing list