Jump to content
Sign in to follow this  
SirMisiek

Execute MSSQL Stored Procedure

Recommended Posts

SirMisiek

I got problem with executing procedure. Got an error:

==> The requested action with this object has failed.:
$rs.Open("declare @aa int exec NewAnalyzeNumber @aa output,1 select @aa as value",$conn)
$rs.Open("declare @aa int exec NewAnalyzeNumber @aa output,1 select @aa as value",$conn)^ ERROR
>Exit code: 1 Time: 0.412

my function is:

Func AnalyzeNumber()
$conn = ObjCreate( "ADODB.Connection" )
$conn.Open("Provider=SQLOLEDB;Data Source="&$serwer[2]&";Initial Catalog="&$baza[2]&";Connect Timeout=150;Network Library=dbmssocn; User ID="&$uzytkownik[2]&"; Password="&$haslo[2]&";")
$rs = ObjCreate("ADODB.RecordSet")
$rs.Open("declare @aa int exec NewAnalyzeNumber @aa output,1 select @aa as value",$conn)
MsgBox(0, "test",$rs.Fields("value").Value)
$conn.Close
EndFunc

Does AutoiT has any problems with sql sequence?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×