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 =,>.,8 +6,<,8,EXEC_ANY_IMM,set chained on =,>.,8 +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 +1,>,8,PREPARE,65536 =,<,8,EXEC_ANY_IMM,dbo.sp_sql_type_name +35,W,8,100,Row not found =,W,8,105,Procedure has completed =,>.,8 +1,<,8,EXEC_ANY_IMM,select property('ProductName') =,W,8,100,Row not found =,W,8,105,Procedure has completed +1,>.,8 +1,<,8,EXEC_ANY_IMM,rollback Could you know why the insert statement was rollbacked ? Thanks in advance, |
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. =,<,8,EXEC_ANY_IMM,dbo.sp_sql_type_name +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. ALTER DATABASE UPGRADE JCONNECT ON; 1
@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. ...or after a previous INSERT?
(06 Feb '12, 04:22)
Volker Barth
|
What API are you using to access the database? And (as usual), what version (and EBF) of SQL Anywhere are you using?