Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Issue executing MySQL query using incremental variable
Topic Summary: Unable to increment a variable in MySQL query step
Created On: 01/26/2017 05:34 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 01/26/2017 05:34 AM
User is offline View Users Profile Print this message

Author Icon
SimoneRanucci
Student (5-19 posts)

Posts: 9
Joined: 11/03/2009

Hi, I am experiencing an issue executing attached MySQL query using incremental variable.

If I run it in MySQL, it completes correctly.
When I put it in AM, I got an error

ADODB.Parameters : Parameter object is improperly defined. Inconsistent or incomplete information was provided


The problem seems to be on character : on line

split_details.RecId = (@Barcode:= @Barcode + 1)


If I remove character :, the query completes but the field is not set incrementally on every record imported as expected but fixed.

I can't understand why. This is the connection string that always works fine but this case...

Provider=MSDASQL.1;Persist Security Info=False;Extended Properties="DSN=c10b4e25;DESCRIPTION=c10b4e25;SERVER=127.0.0.1;UID=root;DATABASE=c10b4e25;PORT=3306"


Could you please give me some advice? Best regards.


 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
 02/02/2017 01:42 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hello,

You will need to double the colon in order to accomplish your request. The solution was found here.

"It's because we use ADO internally and colons are used to pass parameters inside a query, which AutoMate does not support. That is why you need to escape the colon. Basically, each time you receive the error "ADODB.Parametersarameter object is improperly defined", there are good chances that you forgot to double a colon. "

Let us know if that works for you.

 Category Survey


-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 02/03/2017 06:20 AM
User is offline View Users Profile Print this message

Author Icon
SimoneRanucci
Student (5-19 posts)

Posts: 9
Joined: 11/03/2009

Thanks, but the problem now is that AM actually executes the query with doubled colon.
And it gets in error...

Microsoft OLE DB Provider for ODBC Drivers:[MySQL][ODBC 5.3(w) Driver][mysqld-5.6.34]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '::=@Barcode+1, split_details.Modified = STR_TO_DATE(@Modified,"%m/%d/%Y %h:%i %' at line 11


Best regards.

 Category Survey
 02/07/2017 03:21 AM
User is offline View Users Profile Print this message

Author Icon
SimoneRanucci
Student (5-19 posts)

Posts: 9
Joined: 11/03/2009

Any suggestion?

 Category Survey
 02/07/2017 10:45 AM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hello,

Would it be possible to set-up a GoToAssist session where we can take a closer look at this issue? If this is possible please send an email over to AutoMate.Support@helpsystems.com with a list of your availability.

Note: Please reference this forum thread in your email.


 Category Survey


-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 02/07/2017 11:06 AM
User is offline View Users Profile Print this message

Author Icon
SimoneRanucci
Student (5-19 posts)

Posts: 9
Joined: 11/03/2009

Just done! Thanks!

 Category Survey
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1044 guests browsing this forum, which makes a total of 1044 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog