|
Home > Archive > Sybase ODBC > November 2005 > Returning error from ODBC connection
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Returning error from ODBC connection
|
|
|
| Hello friends!
I have problem returning error to ASP/ADO client using ODBC Provider and
Sybase ODBC driver.
Sybase ASE ODBC driver 04.10.0060
It seems like reiserror statement is ignored completely in my code!
If i run this code from SQL Advantage everything is fine. All messages come
out.
I wonder if somebody also has this problem.
Any help will be greatly appreciated.
| |
|
| Hi,
That driver is old, and is only to be used when the TDS based driver (Sybase
ASE ODBC Driver) has some problem. 4.10.0060 is ctlib based, whereas the
current release, found in SDK 12.5.1 ESD#10, is TDS based. In between those
builds there was a fix:
345869: ODBC: Raiserror was always returning as SQL_SUCCESS_WITH_INF
O in
stored
procedure call. To provide flexibility a new connection property has been
added: SybaseWorkArounds. The following details provide the information on
the option:
Connection String name for SybaseWorkArounds
Long Name: SybaseWorkArounds
Short Name: SWA
Possible Values of SybaseWorkArounds for RaiseError:
0 RaiseError as Warning, the default
1 RaiseError as Error
---------------------------------------------------------
ADO API does not automatically handle SQL_SUCCESS_WITH_INF
O. By setting the
SybaseWorkArounds (SWA) property to 1, you should receive the raiserror as
an error in your application.
I would look into this to see if this is the problem you are having. To use
this change you need to upgrade the driver.
The option is not configurable in the GUI (ODBC Admin Tool) but you can add
it to an application connection string OR you can add to the Data Source in
the windows registry (System DSN : HKLM\Software\ODBC\O
DBC.INI\DSN_NAME
-Paul
"CNemo" <mikeevteev@yahoo.com> wrote in message
news:43822430@forums
-1-dub...
> Hello friends!
>
> I have problem returning error to ASP/ADO client using ODBC Provider and
> Sybase ODBC driver.
>
> Sybase ASE ODBC driver 04.10.0060
>
> It seems like reiserror statement is ignored completely in my code!
>
> If i run this code from SQL Advantage everything is fine. All messages
come
> out.
>
> I wonder if somebody also has this problem.
>
> Any help will be greatly appreciated.
>
>
>
| |
|
| Thanks a lot!
I finally it makes some sense! Today was like a hiting wall. A lot of tests
and no positive results. I developed app with ole provider, but manager
insists that production server has odbc only. And he says it's stable.
Looking at it on my computer i hardly can believe it. Need find out what
they use in reality.
Thank you one more time.
|
|
|
|
|