11-20-2012 09:43 AM
Need to call a procedure from teststand and having problems formating the statement. Here's the statement and the type paramenters needed.
EXECUTE dbo.GetAddress (Name),startnumber,endnumber,serial
Name = String
startnumber = int
endnumber = int
serial = string
so what works in sql is this statement EXECUTE dbo.GetAddress 'NW',100,105,'2001'
So i'm having problems with where to put the single and double quotes.
Trying to do this
EXECUTE dbo.GetAddress FileGlobals.StyleParse["CustomLabels"].CustomerName,Val(FileGlobals.StartAddress), Val(FileGlobals.EndAddress),FileGlobals.SerialNumber
11-21-2012 10:14 AM
Hi hallawt,
Take a look at the knowledgebase article below that discusses how to build SQL Statements. Admittedly this is not straightforward so if you have any questions regarding this article or are still having trouble please let me know.
http://digital.ni.com/public.nsf/allkb/BC46654FA87D130E8625695A0000932B?OpenDocument
11-21-2012 10:41 AM
Read the article, it does not help much when dealing with multiple parameters, as stated the procedure is looking for four parameters, with three as must be present, start, end and serial.
Was told to Open SQL statement frist with the EXECUTE command, then perform a data operation, got an error when that method was used.
See below for setup information.
Settings
Open statement
Data operation setup
Data operation parameters
Got the following error executing the steps below:
Details:
Native error code -2147217900 0x80040e14
Microsoft SQL Native Client:
Syntax error, permission violation, or other nonspecific error
Error Code: -10; User-defined error code.
Location: Step 'Data Operation' of sequence 'Get Next Available Address' in 'LCR5200_4700 FT.seq'