here's my code:
my $sth = $dbhSQL->prepare('{ca ll proc(?,?,?)}');
$sth->bind_param(1," asd");
$sth->bind_param(2," klm");
$sth->bind_param_ino ut(3,\$no_go, 1000);
$sth->execute;
print "no go = $no_go\n";
while(
my @row=$sth->fetchrow_array ){
print "@row\n";
}
$sth->finish;
Here's my stored procedure:
CREATE PROCEDURE proc
@id varchar(50),@iy t varchar(20),@no _go int OUTPUT
AS
SET NOCOUNT ON
DECLARE @id_err int,@ans_glue_e rr int
BEGIN TRANSACTION
SELECT user_id FROM myTable
WHERE user_id=@id AND iyt=@iyt
SET @id_err = @@ERROR
IF @@ROWCOUNT <> 0
BEGIN
SELECT date,date_mod FROM ans_glue
WHERE user_id=@id
SET @no_go = 0
SET @ans_glue_err=@ @ERROR
END
ELSE
BEGIN
SET @no_go = 1
END
IF @id_err = 0 AND @ans_glue_err = 0
BEGIN
COMMIT TRANSACTION
END
ELSE
BEGIN
ROLLBACK TRANSACTION
END
the procedure runs perfectly in Cold Fusion, returning both recordsets
and output param, but in perl, it won't print the output param and I
don't know how to access the second recordset
HELP! 1 2958
Cliff (cl***@walkacro ssfire.com) writes: here's my code:
my $sth = $dbhSQL->prepare('{ca ll proc(?,?,?)}'); $sth->bind_param(1," asd"); $sth->bind_param(2," klm"); $sth->bind_param_ino ut(3,\$no_go, 1000); $sth->execute; print "no go = $no_go\n"; while( my @row=$sth->fetchrow_array ){ print "@row\n"; } $sth->finish; ... the procedure runs perfectly in Cold Fusion, returning both recordsets and output param, but in perl, it won't print the output param and I don't know how to access the second recordset HELP!
You are probably better off to ask this in a forum devoted to DBI.
ActiveState hosts a mailing list, see http://aspn.activestate.com/ASPN/Mai...eaded/perl-DBI.
--
Erland Sommarskog, SQL Server MVP, so****@algonet. se
Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Bari Allen |
last post by:
I have a Stored procedure in SQL, that works, when tested in SQL, with one
input & several output parameters, as follows:
CREATE PROCEDURE myProcedure
@MyID int
, @First varchar(80) OUTPUT
, @Second varchar(80) OUTPUT
, @Third varchar(80) OUTPUT
, @Amount as numeric(18,0) OUTPUT
etc.
|
by: Lepa |
last post by:
Hi
I'm trying to make this to work and need help
Here my SP and I'm building sql with output param.
Alter PROCEDURE lpsadmin_getSBWReorderDollars
(
@out decimal(10,2) output,
@sType varchar(20),
|
by: Axel |
last post by:
Hi,
I am currently creating an ASP page that returns a recordset of search
result based on multiple keywords. The where string is dynamically
built on the server page and that part work quite well. However I want
to also return the number of records in the recordset and I can not
manage to get any output parameter working. Even if I assign...
|
by: Bari Allen |
last post by:
ASP Classic question:
I have a Stored procedure in SQL, that works, when tested in SQL, with one
input & several output parameters, as follows:
CREATE PROCEDURE myProcedure
@MyID int
, @First varchar(80) OUTPUT
, @Second varchar(80) OUTPUT
, @Third varchar(80) OUTPUT
, @Amount as numeric(18,0) OUTPUT
|
by: stjulian |
last post by:
If inside a stored procedure, there a SELECT statement to return a recordset
and another SELECT to set the value of an output parameter (as in SELECT
@OutValue = Name FROM table WHERE pkid=5), would 2 execute statements be
needed to return the OUTPUT parameter?
Like this?
adocmd.CommandTimeout = 120
adocmd.ActiveConnection = conn
| |
by: michelle |
last post by:
I am trying to get an output value from a stored procedure using
sqlDataSource in asp.net 2.0. But I only get a null value for the
output. Can someone please help?
The sqlDataSource:
<asp:SqlDataSource ID="DataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings: ConnectionString1 %>"
SelectCommand="UserLkp"...
|
by: Alec MacLean |
last post by:
Hi,
I'm using the DAAB Ent Lib (Jan 2006) for .NET 2.0, with VS 2005 Pro. My project is a Web app project (using the WAP add in).
Background: I'm creating a survey system for our company, for which invites will target selected personnel among our customers via email. Each email will provide a custom hyperlink for each respondent using a...
|
by: gnewsgroup |
last post by:
First, just in case, BLL = Business Logic Layer and DAL = Data Access
Layer.
I guess this is really a question about architecture. I believe there
are many architect here.
Software architecture is sorta new to me. I searched a little and did
find this:
http://www.velocityreviews.com/forums/t300246-bll-and-dal.html
|
by: leesquare |
last post by:
Hello,
I need some help getting output values from my stored procedures when
using adodbapi. There's an example
testVariableReturningStoredProcedure in adodbapitest.py, and that
works for my system. But my stored procedure also inserts and
accesses a table in the database. Here's what I have it boiled down
to:
So, when I have
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |