freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] SQLExecDirect() of transaction statement returnsSQL_NO_DATA
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] SQLExecDirect() of transaction statement returnsSQL_NO_DATA
- Date: Tue, 8 Jan 2008 14:09:34 +0100
>
> Is it expected that an SQLExecDirect("BEGIN TRANSACTION")
> returns SQL_NO_DATA (100) ?
>
> I would maybe expect SQL_SUCCESS_WITH_INFO, but not SQL_NO_DATA ...
>
> Attached, a sample to reproduce, give me this output:
>
> >> SQLExecDirect return code = 100 for [BEGIN TRANSACTION]
> >> SQLExecDirect return code = 100 for [COMMIT TRANSACTION]
> >> SQLExecDirect return code = 100 for [BEGIN TRANSACTION]
> >> SQLExecDirect return code = 100 for [ROLLBACK TRANSACTION]
> >> SQLExecDirect return code = 100 for [SET TRANSACTION
> ISOLATION LEVEL READ UNCOMMITTED]
> >> SQLExecDirect return code = 100 for [SET TRANSACTION
> ISOLATION LEVEL READ COMMITTED]
> >> SQLExecDirect return code = 100 for [SET TRANSACTION
> ISOLATION LEVEL REPEATABLE READ]
> >> SQLExecDirect return code = 100 for [SET TRANSACTION
> ISOLATION LEVEL SERIALIZABLE]
>
> Seb
>
Using ODBC 3 SQLExecDirect/SQLExecute can return SQL_NO_DATA with means
SQL_SUCCESS with no rows, from manual
"If SQLExecDirect executes a searched update or delete statement that
does not affect any rows at the data source, the call to SQLExecDirect
returns SQL_NO_DATA.
"
there are more sligthly difference between MS ODBC and our driver but
any ODBC compliant applications should support both results (in this
case is complitely correct). Personally sometimes I use a macro defined
as
#define SQL_SUCCEEDED_EX(rc) (((rc) & 2) == 0)
which catches SQL_SUCCESS, SQL_SUCCESS_WITH_INFO and SQL_NO_DATA.
freddy77
-
[freetds] SQLBindParameter using TIMESTAMP_STRUCT: Fractional part is wrong,
Sebastien FLAESCH, 01/07/2008
-
Re: [freetds] SQLBindParameter using TIMESTAMP_STRUCT: Fractional partis wrong,
ZIGLIO, Frediano, VF-IT, 01/08/2008
-
Re: [freetds] SQLBindParameter using TIMESTAMP_STRUCT: Fractional partis wrong,
Sebastien FLAESCH, 01/08/2008
-
[freetds] SQLExecDirect() of transaction statement returns SQL_NO_DATA,
Sebastien FLAESCH, 01/08/2008
-
Re: [freetds] SQLExecDirect() of transaction statement returnsSQL_NO_DATA,
ZIGLIO, Frediano, VF-IT, 01/08/2008
-
Re: [freetds] SQLExecDirect() of transaction statement returnsSQL_NO_DATA,
Sebastien FLAESCH, 01/08/2008
-
[freetds] SQLNumResultCols() is wrong (+1),
Sebastien FLAESCH, 01/08/2008
- Re: [freetds] SQLNumResultCols() is wrong (+1), ZIGLIO, Frediano, VF-IT, 01/08/2008
- Re: [freetds] SQLNumResultCols() is wrong (+1), Frediano Ziglio, 01/10/2008
- Re: [freetds] SQLNumResultCols() is wrong (+1), ZIGLIO, Frediano, VF-IT, 01/10/2008
- Re: [freetds] SQLNumResultCols() is wrong (+1), Sebastien FLAESCH, 01/10/2008
-
[freetds] SQLNumResultCols() is wrong (+1),
Sebastien FLAESCH, 01/08/2008
-
Re: [freetds] SQLExecDirect() of transaction statement returnsSQL_NO_DATA,
Sebastien FLAESCH, 01/08/2008
- [freetds] Are LOBs supported?, Sebastien FLAESCH, 01/08/2008
- Re: [freetds] Are LOBs supported?, ZIGLIO, Frediano, VF-IT, 01/08/2008
- Re: [freetds] Are LOBs supported?, ZIGLIO, Frediano, VF-IT, 01/08/2008
- Re: [freetds] Are LOBs supported?, Sebastien FLAESCH, 01/08/2008
-
Re: [freetds] SQLExecDirect() of transaction statement returnsSQL_NO_DATA,
ZIGLIO, Frediano, VF-IT, 01/08/2008
-
[freetds] SQLExecDirect() of transaction statement returns SQL_NO_DATA,
Sebastien FLAESCH, 01/08/2008
-
Re: [freetds] SQLBindParameter using TIMESTAMP_STRUCT: Fractional partis wrong,
Sebastien FLAESCH, 01/08/2008
-
Re: [freetds] SQLBindParameter using TIMESTAMP_STRUCT: Fractional partis wrong,
ZIGLIO, Frediano, VF-IT, 01/08/2008
Archive powered by MHonArc 2.6.24.