Re: ADO




"Jonathan Neve[Microtec]" <jonathan@xxxxxxxxxxx> wrote in message
news:xn0eqthec4bm64003jmn_microtec@xxxxxxxxxxxxxxxxxxxxx
Dennis Landi wrote:


"Jonathan Neve[Microtec]" <jonathan@xxxxxxxxxxx> wrote in message

This SQL runs fine from an SQL tool, but not in my application.
Does it perhaps not accept scripts, but only single SQL statements?


If my memory serves, that's correct. Put the Transact SQL in a
function or stored proc and then call that from a normal query i.e.
"call MyStoredProc()"

Well, actually, the bit of SQL I was trying to execute was designed to
do precisely that: call a stored procedure and retreive values from it.
So if I make another stored procedure to call the first one, I will
have the same problems... Is there really no one-line way, with MS SQL
Server, of returning data from a stored procedure?

I suppose I'm going to have to make three separate queries, one for
each statement... What a daft syntax! :)

Get the Stored Proc to run, stand-alone in you MS SQL Editor.

I.E. does "call MyStoredProc()" work in your editor?

If so, then why not use a tADOStoredProc to call it directly?

I would have to go back to look at my old ADO code to help you further. I
think there is an ADO forum here isn't there? Don't remember.


-d







.



Relevant Pages

  • Re: Dependencies of stored procedures in DTS packages
    ... SP_depends is the stored proc I was referring to. ... >> objects from the sysdepends table. ... >> it depends on the missing object 'you stored procedure name here'. ... >> SQL Server MVP ...
    (microsoft.public.sqlserver.dts)
  • RE: Inserting/deleting data in table in multiuser environment
    ... Add a field to the table in the SQL DB? ... Capture the value to a variable before you send it to the stored proc, ... I did create a table in a front-end to just copy data from that table on SQL ... the stored procedure will be running each time with report generation anyway. ...
    (microsoft.public.access.modulesdaovba)
  • Retrieving primary key of newly added record
    ... stored proc explicty). ... key field is an identity/autonumber one in SQL Server - that is SQL ... I'm worried that if I do another explicit query, ... Handling concurrency with stored procs. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: full-text contains * issue
    ... You may also want to consider using a stored proc for this situation as it ... EXEC usp_FTSearchPubsInfo '' ... > no data but was concatenation of the fields I wanted to index. ... > This is the SQL ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Parameter Sniffing - Need more info
    ... Consider a stored proc defined as follows: ... In 6.5, at compile time SQL ... when compiling a plan. ... execution plans, but a key requirement for everything to work as expected ...
    (microsoft.public.sqlserver.programming)