Need to retrieve columns names from result using DBI.
How would I retrieve the column names from the code below using DBI?
Keep in mind that I am calling a stored procedure in SQL Server in my
statement. $sth->{NAME} won't return what I'm looking for exactly...
use DBI;
....
# stored procedure call.
my $statement = "sp_example 'apples'";
my $sth = $self->dbh->prepare($statement);
$sth->execute;
my $rv = $sth->fetchrow_arrayref;
....
The stored procedure would look something like this:
create procedure sp_example (@abc varchar(100)) as
select
*
from fruits
where
type = @abc
GO
.
Relevant Pages
- Re: Checking for return codes
... The last generated key in a SQL Server can be found by calling "Select ... In the stored procedure I would like to run a select to ... select in the SQL Server stored procedure to my VB .Net procedure? ... (microsoft.public.dotnet.framework.adonet) - Disable Server Error Messages to Client App (VB)
... Using SQL Server 2000 and VB5, ... calling a stored procedure from VB code. ... (microsoft.public.vb.database.ado) - asyncron sql server operations
... TAdoComman) so that the programm runs after calling a stored procedure in ... sql server, although the sp is not already yet? ... (borland.public.delphi.database.ado) - Re: Text datatype
... What most people do as a work around is either use multiple varchar columns ... The stored procedure inserts data into the text column in the temp table, ... Wayne Snyder, MCDBA, SQL Server MVP ... CREATE PROCEDURE Calling ... (microsoft.public.sqlserver.programming) - Disable Server Error Messages to Client App (VB)
... Using SQL Server 2000 and VB5, ... calling a stored procedure from VB code. ... (comp.lang.basic.visual.database) |
|