Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. Forums > Products Zone > Automation Anywhere Server & Enterprise
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Server & Enterprise Post messages and questions related to Automation Anywhere Server or Automation Anywhere Enterprise here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-28-2010, 02:30 PM
kylepyro kylepyro is offline
Junior Member
 
Join Date: Nov 2008
Posts: 28
Default Trouble Processing SQL Insert

I have a script I wrote in Standalone version of AA. I was having reliability problems on an older computer so I was altering it to include more delays and use the keyboard in a more reliable fashion.

I finished all that and then updated the sql for session ID and loop structures needed to read datacolumn fields into variables. This all works fine until I get to an insert statement, which returns an error message about locks.

At first I thought I'd made an error in the sql, but I've dug pretty deeply now and don't see anything wrong there. I've attached the log file for your review that shows the error AA is getting back.

We have AA process using this file every day, so I know this isn't a rights problem.

This is an insert statement, so its not a record lock problem.

When I display record locks (dsprcdlck) I get nothing (how could you on an insert)

I only have one session on this database so the record I'm trying to write can't be held in a different cursor.

I've attached a spreadsheet that shows the two insert statements, one coming from the standalone version and the other from the server version.

I've included an atmn file (scratch) that contains 3 lines, connect/insert/disconnect. I've cut this insert statement out of the atmn file and pasted it directly into the sql editor for this database. It runs fine there so there is nothing syntactically wrong with the insert statement itself.

So,
  • the insert statement itself would appear to be correct because it runs in the sql editor for this database
  • the connection would appear to be valid because I can read from this connection.
  • the exe developed under the stand-alone version works correctly
So, I'm looking for a little help here on what to do to get the server version of the atmn working.

thnx
Attached Files
File Type: atmn scratch.atmn (2.3 KB, 2 views)
File Type: zip sql sample.zip (5.4 KB, 5 views)
File Type: txt BOL_Index_Log.txt (1.7 KB, 2 views)
File Type: atmn BOL Index 2.atmn (35.7 KB, 5 views)
Reply With Quote
  #2 (permalink)  
Old 04-29-2010, 12:07 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

We looked into the task you uploaded and tried to reproduce the similar scenario at our end but it did not reproduce. We have attached amended task we tested with.

Your Insert query should be,

INSERT INTO tablename (field1, field2, field3)
VALUES ('$Var1$', '$Var2$', $Var3$)

Note: Provide table name without alias

Please ensure that you are using this Insert query with 'Insert/Update/Delete' option of Database command and not with the 'SQL Query' option.

Hope that helps.
Attached Files
File Type: zip scratch.zip (11.5 KB, 3 views)
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -7. The time now is 01:32 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved