The forum will be unavailable for maintenance at some point from Friday, April 13 at 19:00 EDT until Sunday, April 15 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.

I succeed in deploy workflow package into simulator. But, on the simaulator, I tried to insert a request record into a table in db, It does not exist in the table.

Is there any option in connection string like autocommit=true ?

So I traced it with starting a asa via "-zr all".

+1,<,8,EXEC_ANY_IMM,set chained off set quoted_identifier on set textsize 2147483647
=,W,8,105,Procedure has completed
+6,<,8,EXEC_ANY_IMM,set chained on
+2,<,8,PREPARE,INSERT INTO sampledb.dba.TravelRequest (trvl_Date, trvl_Loc, est_Cost, purpose, trvl_Status, st_Cmmnt) VALUES (?, ?, ?, ?, ?, ? )  SELECT * FROM sampledb.dba.TravelRequest WHERE trvl_Id=@@IDENTITY
+35,W,8,100,Row not found
=,W,8,105,Procedure has completed
+1,<,8,EXEC_ANY_IMM,select property('ProductName')
=,W,8,100,Row not found
=,W,8,105,Procedure has completed

Could you know why the insert statement was rollbacked ?

Thanks in advance,

asked 05 Feb '12, 20:54

ooops's gravatar image

accept rate: 0%

edited 05 Feb '12, 21:13

Mark%20Culp's gravatar image

Mark Culp

What API are you using to access the database? And (as usual), what version (and EBF) of SQL Anywhere are you using?

(06 Feb '12, 02:27) Volker Barth

This output looks like you are using jConnect to connect to the database ('EXEC_ANY_IMM' preceeds all statements and you are automatically executing 'sp_tsql_environment' upon start-up) - is that correct?

Is there any option in connection string like autocommit=true ?

For jConnect, you need to use the connection-level method from the JDBC API specification: Connection.setAutoCommit(). For other APIs, see this documentation section.

+35,W,8,100,Row not found

"sp_sql_type_name" is a jConnect metadata stored procedure call (and this information is being requested from your Java program, via a JDBC "metadata" call).

If you are required to return this type of data (database metadata) to your Java application, you are required to install the jConnect metadata system objects on to your database first.

e.g. Using "ALTER DATABASE":

permanent link

answered 06 Feb '12, 12:28

Jeff%20Albion's gravatar image

Jeff Albion
accept rate: 24%

edited 06 Feb '12, 14:00


@Jeff: Thanks for telling so much more than just "Yes, I could know":)

(06 Feb '12, 12:48) Volker Barth

Can you provide the original statement? From the log above your insert statement looks to me as if you try to insert based on a select. The statement

SELECT * FROM sampledb.dba.TravelRequest WHERE trvl_Id=@@IDENTITY

will only provide you a result after the insert, because @@IDENTITY returns the id of the last inserted autoincrement field.

permanent link

answered 06 Feb '12, 02:59

Martin's gravatar image

accept rate: 14%

...or after a previous INSERT?

(06 Feb '12, 04:22) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 05 Feb '12, 20:54

question was seen: 1,386 times

last updated: 06 Feb '12, 14:00