Re: stored proc RETURN_VALUE.... there it is, I want to use it !!!



sorry Ron... I think my problem here is bigger then that... if I could just
get the stored procedure to run like every other stored procedure that I've
put together over numerous applications I could go from there and try to
return an output parameter. I've gone back to the basics because there
appears to be something else not working and I can't figure out what gives
on it.

I've replaced components, verified parameters... deleted the stored proc,
verified the syntax, deleted and recreated my user on the server and
verified the rights... I'm going nowhere fast... I can't get it to run... at
all... return value, no return value...

If I hook up a datasource and grid and default the parameters and set it
active I can see the result... but as soon as I set the parameters in the
code and run I get the fieldname back but no value... I feel like I'm losing
it.

I'd be happy to try your suggestion once I get past this hurdle... if you
can think of anything that I haven't tried I'm open to ideas.

thanx
b
(going home now)
"Ron" <noone@xxxxxxxxxxx> wrote in message
news:42701b3b$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> Betsy,
> I sent you this earlier on. This does work on my system.
> D6 + ADOExpress + SQL Server 2000 Desktop Edition.
>
> CREATE PROCEDURE dbo.getPayments
> @meetingCode char(6),
> @guestid char(10),
> @total int OUTPUT
> AS
> SELECT @total = SUM(amount)
> FROM dbo.payments
> WHERE meetingCode = @meetingCode AND guestid = @guestID
> GO
>
> Then you can read the value of @total after closing the query.
>
> You will have to add the @total param as an int with a direction of
> pdOutput.
>
> So, the method you could use would be
> 1 Put your hair back in.
> 2 Set up your input param values.
> 3 Open the query.
> 4 Close the query.
> 5 Read the integer value of the @total output param.
>
> Note, the result of this sql code (in @total) returns an integer that is
the
> sum of the 'amount' column from the 'payments' table.
> Is that what you wanted?
>
> Good Luck,
>
> Ron.
>
> "Betsy" <betsy.a.tainer@xxxxxxxxxxxxx> wrote in message
> news:427007d2$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> > SEVERELY STUMPED...
> >
> > I've started a whole new project... eliminate absolutely everything but
> this
> > one stored procedure... nothing...
> > it appears to run okay... returns field heading for the return value...
no
> > value... regardless of what I tell it to do...
> >
> > skip the sum(amount)... just give * (every flipping thing)... same
> thing...
> > field headings... no values...
> >
> > hard-code the guestid and meeting code... same thing...
> >
> > take the guts of the stored proc with hard coded guestid and meeting
code
> > and run it as a normal sql statement in the enterprise manager... all is
> > well... I'm at a total loss. This is such a basic thing and I've done
it
> > over and over again... I don't understand why it's not working.
> >
> > HELP!
> >
> > ideas? authorities... ??? all appears to be okay... signon as dbo... so
> > should have authority... no errors....
> > b
> <snip>
>
>


.



Relevant Pages

  • Re: How to determine actual constraint name by passing a column name
    ... Of course I meant rewrite sp_helpconstraint as a NEW stored procedure, ... Ron ... > Your query will not pick up unique and primary key constraints - they have ...
    (microsoft.public.sqlserver.server)
  • Re: Insert statement throwing an 80040E14 error
    ... I ended up creating the Stored Procedure as ... Mike W. suggested and when I passed the string as a parameter for that SP it ... > Ron Lounsbury wrote: ...
    (microsoft.public.vb.general.discussion)
  • Re: Insert statement throwing an 80040E14 error
    ... I ended up creating the Stored Procedure as ... Mike W. suggested and when I passed the string as a parameter for that SP it ... > Ron Lounsbury wrote: ...
    (microsoft.public.vb.database)
  • Re: noise words, @@ERROR, and stop and resume indexing
    ... > Noiseword varcharNot Null ... > the data from the noise file to the noise_words table. ... >> A clause of the query contained only ignored words. ... >> into query analyzer before starting the stored procedure. ...
    (microsoft.public.sqlserver.fulltext)
  • RE: ODBC query in VB code Need HELP
    ... I am trying to get a stored procedure to run on info I send it I do not need ... I played around and got the code below to work using a pass-through query, ... Dim strpass As String ...
    (microsoft.public.access.formscoding)