Network Automation Software
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: Stored Procedure Input parameter problem
Topic Summary:
Created On: 05/26/2009 04:31 AM
Status: Post and Reply
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.
Answer This question was answered by JeanDelfosse, on Wednesday, May 27, 2009 10:32 AM

Answer:
Aaron,
as you might see in the AML generated for the step when you type directly
This is a test, and again.
the comma (,) gets doubled (,,) inthe AML.
This is because the values parameters of the action are comma separated, therefore commas inside a value are doubled to make the difference. See sample below.

If your variable tmpComm can contain commas, you could double them using
%replace(tmpComm,",",",,")%
instead of the mere
%tmpComm%
 05/26/2009 04:31 AM
User is offline View Users Profile Print this message

Author Icon
AaronSkwarczek
Apprentice (20-49)

Posts: 22
Joined: 07/15/2005

*** Sorry this should be in Automate 7 Forum ***

I've got an SQL Server stored prcedure that has a String input parameter. When I manually put the following in the value field:

This is a test, and again.

the stored proc updates the table I want no problem, but if I assign an automate var with the exact same text and change the value field to: %tmpComm% I get errors. It seems to not like the comma in the string. If I take it out or change it for a dot, it goes through fine.

The input parameter in the stored proc is varchar(1000).

I've tried this in v6.2.7 pro and 7.0.8.1 pro and both have the same result.

The output is as follows:
(Step 1) Creating a variable "tmpComm"...
(Step 3) Starting Execute Stored Procedure "test_test"...
(Step 3) Connecting to the database...
(Step 3) Invalid value in field: "TYPE" for parameter #4.
(Step 3) ADODB.Parameter:Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
(Step 3) Invalid value in field: "DIRECTION" for parameter #4.
(Step 3) ADODB.Parameter:Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
(Step 3) Invalid value in field: "SIZE" for parameter #4.
(Step 3) Invalid value in field: "NUMSCALE" for parameter #4.
(Step 3) Invalid value in field: "PRECISION" for parameter #4.
(Step 3) Finished Execute Stored Procedure "test_test".
(Step 3) Task Ended.



Any ideas please.

Aaron
 05/26/2009 05:50 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 5221
Joined: 03/30/2005

Answer Answer
Aaron,
as you might see in the AML generated for the step when you type directly
This is a test, and again.
the comma (,) gets doubled (,,) inthe AML.
This is because the values parameters of the action are comma separated, therefore commas inside a value are doubled to make the difference. See sample below.

If your variable tmpComm can contain commas, you could double them using
%replace(tmpComm,",",",,")%
instead of the mere
%tmpComm% Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM7, BPA7, AM6 Enterprise
 05/26/2009 06:05 AM
User is offline View Users Profile Print this message

Author Icon
AaronSkwarczek
Apprentice (20-49)

Posts: 22
Joined: 07/15/2005

Jean, you're a legend.

Many thanks
 05/26/2009 12:22 PM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 5221
Joined: 03/30/2005

You're welcome, Aaron.
Another character that would cause problem is double quotes, but for this I have no workaround.

-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM7, BPA7, AM6 Enterprise
Statistics
9533 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.

FuseTalk Enterprise Edition v3.2 - © 1999-2010 FuseTalk Inc. All rights reserved.

Sitemap