PDO ODBC & MSSQL Stored Procedures that return record sets

From: Date: Thu, 12 Oct 2006 13:19:27 +0000
Subject: PDO ODBC & MSSQL Stored Procedures that return record sets
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-27231@lists.php.net to get a copy of this message
Hello, I am having trouble with pdo_odbc and calling a stored procedure that returns a record set. I have tried with out using parameters: $stmt = $dbh->prepare("EXEC ASC_GridData @StartRecordIndex=0,@PageSize=15,@SortColumn='',@SortDirection='ASC',@Filter ='lscShowCode=14 and lscType=2',@PrimaryKey='lscCode',@Fields='lscComponent,lscDescription,lscPos ition',@TableName='BB_LC_ShowComponent'"); And with using parameters $a[StartRecordIndex] = 0; $a[PageSize] = 15; $a[SortColumn] = ''; $a[SortDirection] = 'ASC'; $a[Filter] = 'lscShowCode=14 and lscType=2'; $a[PrimaryKey] = 'lscCode'; $a[Fields] = 'lscComponent,lscDescription,lscPosition'; $a[TableName] ='BB_LC_ShowComponent'; //$stmt = $dbh->prepare("exec ASC_GridData :StartRecordIndex,:PageSize,:SortColumn,:SortDirection,:Filter,:PrimaryKey,: Fields,:TableName"); $stmt->execute($a); print_r($stmt); $row = $stmt->fetch(); print_r($row); Both do not return data thought using sql profiler it looks like it is running the query just not navigating the result set. Aspen Olmsted Alliance Software Corporation 17 Pitt St Charleston SC, 29401 aspen.olmsted@alliance.biz

« previous php.windows (#27231) next »