Return value in a stored Procedure using PD

Hi,
I am running a stored procedure that needs to pass a value back to
PowerDynamo.
I have looked through the PD books on this and cannot find anything
relevant to stored procedures, in the index.  my connection calls the
stored procedure with 3 values.  The last line in stored procedure is a
select stmt from a table to pull back an ID.  How is that Id to be
referenced in the PD code?
thanks
samantha


0
S
2/3/2000 4:32:10 PM
sybase.easerver 11371 articles. 0 followers. Follow

5 Replies
413 Views

Similar Articles

[PageSpeed] 45

PD cant handle return values or INOUT's.

Dave Wolf
Internet Applications Division

S.Brooks <sbrooks@fnac-usa.com> wrote in message
news:3899AD8A.1883C748@fnac-usa.com...
> Hi,
> I am running a stored procedure that needs to pass a value back to
> PowerDynamo.
> I have looked through the PD books on this and cannot find anything
> relevant to stored procedures, in the index.  my connection calls the
> stored procedure with 3 values.  The last line in stored procedure is a
> select stmt from a table to pull back an ID.  How is that Id to be
> referenced in the PD code?
> thanks
> samantha
>
>


0
Dave
2/3/2000 6:06:59 PM
Dave,
I had a feeling that was the answer.
Can you tell me how do I writetext in PD.  Please say I can do that!
thanks
samantha


"Dave Wolf [Sybase]" wrote:

> PD cant handle return values or INOUT's.
>
> Dave Wolf
> Internet Applications Division
>
> S.Brooks <sbrooks@fnac-usa.com> wrote in message
> news:3899AD8A.1883C748@fnac-usa.com...
> > Hi,
> > I am running a stored procedure that needs to pass a value back to
> > PowerDynamo.
> > I have looked through the PD books on this and cannot find anything
> > relevant to stored procedures, in the index.  my connection calls the
> > stored procedure with 3 values.  The last line in stored procedure is a
> > select stmt from a table to pull back an ID.  How is that Id to be
> > referenced in the PD code?
> > thanks
> > samantha
> >
> >

0
S
2/3/2000 6:18:31 PM
Sam,

You can do this, and I used to have an example but I cannot for the life of
me find it.  Basically you just execute the same batch calls you would to do
a writetext any other time.

Ill keep looking

Dave Wolf
Internet Applications Division

S.Brooks <sbrooks@fnac-usa.com> wrote in message
news:3899C677.87E7A7B9@fnac-usa.com...
> Dave,
> I had a feeling that was the answer.
> Can you tell me how do I writetext in PD.  Please say I can do that!
> thanks
> samantha
>
>
> "Dave Wolf [Sybase]" wrote:
>
> > PD cant handle return values or INOUT's.
> >
> > Dave Wolf
> > Internet Applications Division
> >
> > S.Brooks <sbrooks@fnac-usa.com> wrote in message
> > news:3899AD8A.1883C748@fnac-usa.com...
> > > Hi,
> > > I am running a stored procedure that needs to pass a value back to
> > > PowerDynamo.
> > > I have looked through the PD books on this and cannot find anything
> > > relevant to stored procedures, in the index.  my connection calls the
> > > stored procedure with 3 values.  The last line in stored procedure is
a
> > > select stmt from a table to pull back an ID.  How is that Id to be
> > > referenced in the PD code?
> > > thanks
> > > samantha
> > >
> > >
>


0
Dave
2/3/2000 6:26:49 PM
Dave,
I have never used writetext before so any code would be helpful.
All i basically have is Sybase related using txtptrs.  But how do I relate that
code to PD.  I am sure I don't obviously say
declare @val varbinary(16)
select @val = textptr(copy) from blurbs where ...
writetext blurbs.copy @val with log "hello world"

This is the only example of have...So umm can you help me out here.
sam


"Dave Wolf [Sybase]" wrote:

> Sam,
>
> You can do this, and I used to have an example but I cannot for the life of
> me find it.  Basically you just execute the same batch calls you would to do
> a writetext any other time.
>
> Ill keep looking
>
> Dave Wolf
> Internet Applications Division
>
> S.Brooks <sbrooks@fnac-usa.com> wrote in message
> news:3899C677.87E7A7B9@fnac-usa.com...
> > Dave,
> > I had a feeling that was the answer.
> > Can you tell me how do I writetext in PD.  Please say I can do that!
> > thanks
> > samantha
> >
> >
> > "Dave Wolf [Sybase]" wrote:
> >
> > > PD cant handle return values or INOUT's.
> > >
> > > Dave Wolf
> > > Internet Applications Division
> > >
> > > S.Brooks <sbrooks@fnac-usa.com> wrote in message
> > > news:3899AD8A.1883C748@fnac-usa.com...
> > > > Hi,
> > > > I am running a stored procedure that needs to pass a value back to
> > > > PowerDynamo.
> > > > I have looked through the PD books on this and cannot find anything
> > > > relevant to stored procedures, in the index.  my connection calls the
> > > > stored procedure with 3 values.  The last line in stored procedure is
> a
> > > > select stmt from a table to pull back an ID.  How is that Id to be
> > > > referenced in the PD code?
> > > > thanks
> > > > samantha
> > > >
> > > >
> >

0
S
2/3/2000 6:55:04 PM
Dave,
I have never used writetext before so any code would be helpful.
All i basically have is Sybase related using txtptrs.  But how do I relate that
code to PD.  I am sure I don't obviously say
declare @val varbinary(16)
select @val = textptr(copy) from blurbs where ...
writetext blurbs.copy @val with log "hello world"

This is the only example of have...So umm can you help me out here.
sam

"Dave Wolf [Sybase]" wrote:

> Sam,
>
> You can do this, and I used to have an example but I cannot for the life of
> me find it.  Basically you just execute the same batch calls you would to do
> a writetext any other time.
>
> Ill keep looking
>
> Dave Wolf
> Internet Applications Division
>
> S.Brooks <sbrooks@fnac-usa.com> wrote in message
> news:3899C677.87E7A7B9@fnac-usa.com...
> > Dave,
> > I had a feeling that was the answer.
> > Can you tell me how do I writetext in PD.  Please say I can do that!
> > thanks
> > samantha
> >
> >
> > "Dave Wolf [Sybase]" wrote:
> >
> > > PD cant handle return values or INOUT's.
> > >
> > > Dave Wolf
> > > Internet Applications Division
> > >
> > > S.Brooks <sbrooks@fnac-usa.com> wrote in message
> > > news:3899AD8A.1883C748@fnac-usa.com...
> > > > Hi,
> > > > I am running a stored procedure that needs to pass a value back to
> > > > PowerDynamo.
> > > > I have looked through the PD books on this and cannot find anything
> > > > relevant to stored procedures, in the index.  my connection calls the
> > > > stored procedure with 3 values.  The last line in stored procedure is
> a
> > > > select stmt from a table to pull back an ID.  How is that Id to be
> > > > referenced in the PD code?
> > > > thanks
> > > > samantha
> > > >
> > > >
> >

0
S
2/3/2000 8:09:04 PM
Reply:

Similar Artilces:

Return Value when using CLR stored procedure. (Edit: For use in SQL side paging)
I have a stored procedure that I put together using the CLR.  The basic idea is the have a query that can accept any number of values.  I havent included the portion of the code that handles smalldatetime searches and I havent yet finished the logic to handle sql data type constraints but I have been working on paging using SQL's Row_Number().  The code below works but I havent been able to come up with a way to find out either how many pages the result set has or how many total rows in the result set.  I thought there might be a way to use a procedure's Return Va...

Use Resultset Returned from a Stored Procedure in another Stored Procedure
I have a store procedure (e.g. sp_FetchOpenItems) in which I would like to call an existing stored procedure (e.g. sp_FetchAnalysts). The stored proc, sp_FetchAnalysts returns a resultset of all analysts in the system. I would like to call sp_FetchAnalysts from within sp_FetchOpenItems and insert the resultset from sp_FetchAnalysts into a local temporary table. Is this possible?  Thanks, Kevin Yes you do that with sp_executesql that is covered in the first link and if you need temp tables the second link covers some tricks of how to use them.  Hope this helps. http://support...

Using values returned by stored procedure
I have called a stored procedure and bound the dataset to a repeater but I need to use elements of what is returned in textboxes. Could somebody tell me the basic syntax to put into the vb script, I have the code below so far SqlDataAdapter1.Fill(DataSet1) Repeater1.DataSource = DataSet1 Repeater1.DataBind() TextBox1.Text = Thanks hi, what does your stored procedure return? how many text box controls you need to bind with the returned values? write back so that can help. thanks.regards,Harishhttp://geekswithblogs.net/ranganh The sto...

Using a Stored Procedure to query other stored procedures and then return the results
Seems like I'm stealing all the threads here, :\ But I need to learn :) I have a StoredProcedure that needs to return values that other StoredProcedures return.Rather than have my DataAccess layer access the DB multiple times, I would like to call One stored Procedure, and have that stored procedure call the others to get the information I need. I think this way would be more efficient than accessing the DB  multiple times. One of my SP is:SELECT I.ItemDetailID, I.ItemDetailStatusID, I.ItemDetailTypeID, I.Archived,     I.Expired, I.ExpireDate, I.Deleted, S.N...

How to use the return value of a stored procedure (URGENT)
  Hi everyone, I have a stored procedure as the following:1 ALTER PROCEDURE dbo.logincheck2 @ID int,3 @Password varchar(50),4 @Result int output5 AS6 IF EXISTS (SELECT * FROM users WHERE (ID=@ID AND Password=@Password))7 BEGIN8 SET @Result=19 END10 11 ELSE12 BEGIN13 SET @Result=014 END15 16 RETURN @Result What I'm trying to do is using @result in my login.aspx.vb to check if user exists in my database. If he is, the result should be 1 and if not it should be 0. Unfortunately, I don't know how to do it. I must...

using the return value from a stored procedure in VB
 Hi guys I know this is a really common question, and I have read loads of replies on it but everything I try does not work.  I have written a small stored procedure in SQL server to upload images to a table and return the new ID using scope_identity.  I have tested it and it works fine.  here it is:*******    @siteID numeric(18,0),    @imgNum numeric(18,0),    @title NVarchar(50),    @MIMEtype nchar(10),    @imageData varbinary(max)ASBEGINSET NOCOUNT ONdeclare @imageID intINSERT INTO [site_im...

How do I use the return value from a SQL stored procedure?
I want to be able to use the returned number to set a Label accordingly.Something like this:if the return value == 1 then Label1.Text = "Correct" else Label1.Text = "Wrong" What is the correct syntax for this?  I couldn't find this answer. If you've just got one return parameter, I usually stick with ExecuteScalar. This will execute a stored procedure and return an object, which is taken from the first row and first column of whatever the stored procedure returns.So at the end of the stored procedure, after doing what you need to do, add a select stat...

Problem with return value of stored procedure when using tableadapters
hello Could you please help me with this problem? I have a stored procedure like this: ALTER PROCEDURE dbo.UniqueChannelName ( @UserName nvarchar(50), @ChannelName nvarchar(50) ) AS return 5;   Then inside of my dataset, I added a new query(dataset1.QueriesTableAdapter) to handle above mentioned stored procedure. Properties window is showing that return type of this adapter is of type int32 as we expected to be. now I want to use it inside of my code: DataSet1TableAdapters.QueriesTableAdapter b = new DataSet1TableAdapters.QueriesTableAdapter(); int i; i=Convert.To...

How do I Use dataset to return a single value (No stored procedures)
I am using the request.queritystring to get the product id which is passed through the URL.  Then using the product id using a sql query, I have to return the product name to be displayed on my web page.  So to do this, how can I do it with a dataset (I dont want to write a stored procedure). For example, in my front end code I have some thing like Product Name: "<%= _productname %>"   In the code behind: public string _productname = null; public int _productid; protected void PageLoad(object sender, EventArgs e) {  _productname = "I hav...

Retreiving Return Value of Stored Procedure using TableAdapter
 I am using a sp with a tableadapter. This returns a interger value, namely if there are not any errors the newly created row's id value. I have found code to fix this but was wondering if anybody else had the same issue and how they fixed it. Here is how I am getting the information now and it is working good. The only issue I have with this is that you have to look through the asp.net generated code to find the commandcollection number, which will be hard coded in my code. I would rather not do this since if the tableadapter changes that this number will change as well. and h...

How to get the return value when using a TableAdapter access a Stored Procedure
I have a Stored Procedure CREATE PROCEDURE test AS BEGIN SELECT Count(*) FROM dbo.test END I can using the unbox get the return value but if i direct return a value form a Stored Procedure like this CREATE PROCEDURE test AS BEGIN return 100 END I can not get the VALUE I do not know how to Please Help Me thx Hi, and welcome to the ASP.NET forums. You can use a SqlParameter with Direction set to ParameterDirection.ReturnValue. Please take a look at this little code sample. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Workaround for non w...

How to detect return value of stored procedure used by a DetailsView Control?
Hi all, I have a DetailsView control in asp.net 2.0 web site.This DetailsView inserts in a database using a stored procedure.This stored procedure has a return value that I should detect to react upon.How to detect the return value of the stored procedure that the DetailsView uses? Many ThanksBishoy you can use a select statement when returning the return value and read it by using datareader. Hi, Bishoy: Here is the sample you can have alook: /*--------------------------------------------*/CREATE TABLE myItem(    itemID INT PRIMARY KEY IDENTITY(1, 1),  ...

How do I retreive a return value from a stored procedure using a table adapter?
I am having a problem with retreiving a return value (TotalRecords) from a stored procedure for use in a code behind on an asp web page.  The stored procedure has 3 input parameters and works fine in generating an integer value when using some test data inside of design query. The SP is initiated with a table adapter which returns tabluar data. I have tried to incorporate "TotalRecords" as a parameter in the tableadapter but get an error indicating too many arguments. Any help would be appreciated. Thanks Here is the SP codeALTER PROCEDURE [rwheway].[GetPlayersPaged...

Return value from Stored Procedure using ASP 3.5
 Hi,     How come I always get the value of zero (0) when I try to return a value coming from SPro?---         Dim getcurrentid = _dbDataContext.getPostID(0) 'stored procedure        Dim x As Integer = getcurrentid.ToStringALTER PROCEDURE dbo.getPostID (@valueID int output) AS SELECT Top 1 @valueID = fieldID FROM Table ORDER BY fieldID DESC  --- Upon executing the SPro using VS2008 SQL Expression, it does returns the value I need. cheers,imperialx how about change the SP ALTER PROCEDU...

Web resources about - Return value in a stored Procedure using PD - sybase.easerver

Invasiveness of surgical procedures - Wikipedia, the free encyclopedia
There are three main categories which describe the invasiveness of surgical procedures . These are: non-invasive procedures , minimally invasive ...

Procedure is more a snap than a snip
A QUEENSLAND doctor is bidding to set an unusual world record by performing the highest number of vasectomies in one day, with the help of fellow ...

Rushed cosmetic procedures a 'recipe for disaster'
&#8203;When Chanelle O'Hare went searching online for a deal on potential cosmetic procedures, she could not have imagined that what she ended ...

Jetstar procedures under investigation after planes took off too heavy
Jetstar's procedures for calculating the weight of its aircraft are under review by the Australian Transport Safety Bureau after two of its planes ...

Old Lady Lawyer: Uncivil Procedure
What is some of the worst behavior you've witnesses by attorneys?

NFL Announces Changes to Officiating Procedures for Playoffs - Bleacher Report
The NFL formally approved changes to its postseason officiating procedures to allow referees the opportunity to consult Vice President of Officiating ...

Will Paul Ryan Make His Mark As Speaker By Instituting Impeachment Procedures Against President Obama ...
Wisconsin Ayn Rand devotee Paul Ryan just started his new job as Speaker of the dysfunctional House Republicans. And he's already headed for ...

TSA Updates Screening Procedure, Will Mandate Some Passengers Use Full-Body Scanners
... Imaging Technologies, or AIT, in favor of full-body pat-downs by TSA agents. Under the new mandate, not everyone can opt for the pat-down procedure. ...

'Painless' dental cavity procedure regrows tooth enamel
... "cavity" a lot of people sweat thinking about painful injections and relentless drilling. But scientists in Britain have developed a new procedure ...

'Daily Show' Host Trevor Noah Hospitalized for Emergency Procedure
'Daily Show' Host Trevor Noah Hospitalized for Emergency Procedure

Resources last updated: 12/24/2015 8:28:17 AM