on 2011 Oct 10 12:28 AM
we are executing some sql string from .NET against sqlanywhere and our errors are not getting reported.
For example. If I have select * from TableThatExists
and then inside the same sql do a select * from TableThatDoesNotExist I don't get any error.
I just receive the first select.
I know the onerror = 'stop' should help but I can't flip that flag since others are using the same database.
I did try to use SET TEMPORARY OPTION ON_ERROR = 'STOP' but that gives an error of "Cannot set a temporary option for user..."
Request clarification before answering.
AFAIK, on_error is an ISQL option and as such does not have any influence on other applications (like your .Net app).
How are you handling errors around your SQL code? I would expect a query against a non-existing table to throw a SAException object...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please provide your select statement, as Volker says you should get an Exception in .net, e.g. for a statement of the form: select * from ExistingTable where x in (select x from NotExisting) something like:
ERROR [42S02] [Sybase][ODBC Driver][SQL Anywhere]Table 'NotExisting' not found
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
30 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.