|
|
|
![]() |
AutoMate Discussion | ![]() |


|
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 |
Topic Tools
|
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% | |
|
|
|
|
*** 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 |
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
Jean, you're a legend.
Many thanks |
|
|
|
|
|
|
|
|
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
|
|
|
|
|
FuseTalk Enterprise Edition v3.2 - © 1999-2010 FuseTalk Inc. All rights reserved.