Skip to Content.
Sympa Menu

freetds - Re: [freetds] When the column typing error is matched, compulsion ROLLBACK is generated.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] When the column typing error is matched, compulsion ROLLBACK is generated.
  • Date: Wed, 26 Jan 2011 22:56:03 -0500

On Wed, 26 Jan 2011 15:54:10 +0900
???? <ymym4649 AT gmail.com> wrote:

Hi ????,

> A "column type mismatch" error example below.
> "colbit" is bit type.
> It tries to set "A" to it.
>
> *SQL: UPDATE [testtable] SET [colbit] = 'A' WHERE testtableid = '1';
> *ErrorMessage: SQLSTATE[HY000]: General error: 20018 The ROLLBACK
> TRANSACTION request has no corresponding BEGIN TRANSACTION. [20018]
> (severity 5) []

Please post a TDSDUMP log that includes the error. I can't reproduce it with
bsqlodbc:

$ cat /tmp/sql && bsqlodbc -S $S -U $U -P $P -i /tmp/sql
if object_id('a') is not NULL
drop table a
go
create table a( a int not NULL)
go
select * from a
go
update a set a = 'a'
go

a
- ---------
bsqlodbc: error -1: SQLExecute: SQL_ERROR: failed
bsqlodbc: error 245: 22018: [FreeTDS][SQL Server]Syntax error converting the
varchar value 'a' to a column of data type int.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page