[freetds] INSERT not working for MSSQL 2000

Peter Matulis pmatulis at gmail.com
Fri Sep 29 16:29:33 EDT 2006


I have SELECT working from a Perl script but I cannot INSERT.  I'm
using DBD:Sybase driver.  Here is the main part:


----------------------------------------------
my $sqlStatement = "

INSERT INTO

        table1(column1)

VALUES('test_string')

";

$sth = $dbh->prepare($sqlStatement);
$sth->execute;
----------------------------------------------


The freetds log shows:

token.c:526:processing result tokens.  marker is  aa(ERROR)
token.c:105:tds_process_default_tokens() marker is aa(ERROR)
token.c:2439:tds_process_msg() reading message from server
read.c:179:tds_get_string: reading 56 from wire to give 28 to client.
read.c:179:tds_get_string: reading 20 from wire to give 10 to client.
token.c:2501:tds_process_msg() calling client msg handler
ct.c:333:ct_con_props() action = CS_GET property = 9108
ct.c:475:fetching userdata 0x9010de8
token.c:2514:tds_process_msg() returning TDS_SUCCEED
token.c:526:processing result tokens.  marker is  fd(DONE)
token.c:2143:tds_process_end: more_results = 0
                was_cancelled = 0
                error = 1
                done_count_valid = 0
token.c:2159:tds_process_end() state set to TDS_IDLE
util.c:119:Changing query state from READING to IDLE
util.c:119:Changing query state from IDLE to PENDING
ct.c:1121:ct_results() process_result_tokens returned 1 (type 4052)
ct.c:1226:ct_results() results state = 0
ct.c:1227:ct_results() command type  = 148
ct.c:1228:ct_results() dynamic cmd   = 0
ct.c:1064:ct_results()
ct.c:1064:ct_results()
token.c:514:tds_process_tokens() state is COMPLETED
ct.c:1121:ct_results() process_result_tokens returned 2 (type 4052)
ct.c:214:setting command state from SENT to READY
ct.c:1765:ct_cmd_drop()
ct.c:1799:ct_cmd_drop() : command entry found in list
ct.c:1804:ct_cmd_drop() : relinking list
ct.c:1811:ct_cmd_drop() : relinked list
ct.c:1822:ct_close()
mem.c:519:tds_free_all_results()
util.c:119:Changing query state from IDLE to DEAD
ct.c:1834:ct_con_drop()



More information about the FreeTDS mailing list