|
Home > Archive > SQL Anywhere database > June 2005 > execute immediate
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]
|
|
| Rony Santoso 2005-06-13, 11:23 am |
| Hello,
I'm using pb 9.02 build 7610 and ASA 8.
I tried to do the following
SQLCA.autocommit = TRUE
EXECUTE IMMEDIATE "WAIT_FOR_COMMIT ON" USING SQLCA;
SQLCA.autocommit = FALSE
but always got error of:
SQLSTATE = 37000
[Sybase][ODBC Driver][Adaptive Server Anywhere]Syntax error or access
violation: Syntax error near 'ON' on line 1
What was wrong?
many thanks,
Rony
| |
| Chris Keating \(iAnywhere Solutions\) 2005-06-13, 11:23 am |
| You can implement this simply in one statement (as it takes effect
immediately). But, you have to use a SET OPTION statement as in:
EXECUTE IMMEDIATE "SET OPTION WAIT_FOR_COMMIT='On'
"
"Rony Santoso" <rony_xg@yahoo.de> wrote in message
news:42adb22a@forums
-1-dub...
> Hello,
>
> I'm using pb 9.02 build 7610 and ASA 8.
>
> I tried to do the following
>
> SQLCA.autocommit = TRUE
> EXECUTE IMMEDIATE "WAIT_FOR_COMMIT ON" USING SQLCA;
> SQLCA.autocommit = FALSE
>
> but always got error of:
> SQLSTATE = 37000
> [Sybase][ODBC Driver][Adaptive Server Anywhere]Syntax error or access
> violation: Syntax error near 'ON' on line 1
>
> What was wrong?
>
> many thanks,
>
> Rony
>
>
| |
| Breck Carter [TeamSybase] 2005-06-13, 1:23 pm |
| Or SET TEMPORARY OPTION...
On 13 Jun 2005 09:28:27 -0700, "Chris Keating \(iAnywhere Solutions\)"
< Spam_NoThanks_keatin
g@iAnywhere.com> wrote:
>You can implement this simply in one statement (as it takes effect
>immediately). But, you have to use a SET OPTION statement as in:
>
>EXECUTE IMMEDIATE "SET OPTION WAIT_FOR_COMMIT='On'
"
>
>"Rony Santoso" <rony_xg@yahoo.de> wrote in message
> news:42adb22a@forums
-1-dub...
>
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
| |
| Rony Santoso 2005-06-14, 3:23 am |
| big thanks to you, it worked
"Breck Carter [TeamSybase]" < NOSPAM__bcarter@risi
ngroad.com> wrote in
message news:mrhra1p9jlqm093
sevl15sbmrv54vpo5kq@
4ax.com...
> Or SET TEMPORARY OPTION...
>
> On 13 Jun 2005 09:28:27 -0700, "Chris Keating \(iAnywhere Solutions\)"
> < Spam_NoThanks_keatin
g@iAnywhere.com> wrote:
>
>
> --
> SQL Anywhere Studio 9 Developer's Guide
> Buy the book:
http://www.amazon.com/exec/obidos/A...7/risingroad-20
> bcarter@risingroad.com
> RisingRoad SQL Anywhere and MobiLink Professional Services
> www.risingroad.com
|
|
|
|
|