ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-windows
php-windows
[PHP-WIN] PDO ODBC & MSSQL Stored Procedures that return record sets
by Aspen Olmsted other posts by this author
Oct 12 2006 6:21AM messages near this date
RE: [PHP-WIN] Unicode data w/PDO DBLIB, MSSQL | [PHP-WIN] Reproducing bug 37448, any workaround?
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
Thread:
Mike Matz
Aspen Olmsted

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved