[freetds] freebcp loads -1 rows

Lowden, James K LowdenJK at bernstein.com
Thu Jun 5 13:35:15 EDT 2003


Using current cvs to load this table with freebcp via TDS 7.0:

CREATE TABLE msg_string (
     data_id int NOT NULL ,
     seq_no int NOT NULL ,
     string1 varchar (255) NULL ,
     string2 varchar (255) NULL ,
     string3 varchar (255) NULL ,
     string4 varchar (255) NULL ,
     string5 varchar (255) NULL ,
     version_date datetime NOT NULL
)

failed with bogus "Attempt to bulk-copy a NULL value" errors.  I just committed fixes.  

The file (attached) still cannot be loaded, however.  The dump ends abruptly, and I don't understand why.  Everything looks normal; the last data are sent; we get a completed token, and abruptly quit.  Here's the end of the dump:

$ tail dump
0180 6f 70 71 72 73 74 75 76-77 78 79 61 62 63 64 65 |opqrstuv wxyabcde|
0190 66 67 68 69 6a 6b 6c 6d-6e 6f 70 71 72 73 74 75 |fghijklm nopqrstu|
01a0 76 77 78 79 61 62 63 64-65 66 67 68 69 6a 6b 6c |vwxyabcd efghijkl|
01b0 6d 6e 6f 70 71 72 73 74-75 76 77 78 79 61 62 63 |mnopqrst uvwxyabc|
01c0 64 65 66 67 68 69 6a 6b-6c 6d 6e 6f 70 71 72 73 |defghijk lmnopqrs|
01d0 74 75 76 77 78 79 31 32-33 34 35 17 6e 00 00 00 |tuvwxy12 345.n...|
01e0 00 00 00               -                        |...|


13:01:24.777998 tds_process_result_tokens() state is COMPLETED
[end dump]

The message from freebcp is "-1 rows copied."

I have a feeling tds_process_simple_query() isn't playing nicely in _bcp_exec_in(), but it's not clear to me what should be done.  

--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.





More information about the FreeTDS mailing list