Re: How can a recordset returned by a sproc be updated?

From: Uri Dimant (urid_at_iscar.co.il)
Date: 07/28/04


Date: Wed, 28 Jul 2004 13:35:53 +0200

Richard
What does it mean 'update a correct table'?
What is exactly an UPDATE statements?
Perhaps you have a trigger defined on the table.

"Richard Hayward" <richard@tortoise.demon.co.uk> wrote in message
news:jj9gg01lvosqnu6kp0ok7m8oiogufj5rud@4ax.com...
> I have an application written in Delphi connecting to MSSQL 2000 via
> ADO.
>
> At the server, using the example pubs database I've created a stored
> procedure:
>
> CREATE PROCEDURE spAuthor AS
> select * from authors
>
> My application displays the resulting records in a grid.
> To my surprise, the application is also able, via ADO, to update the
> table in pubs.
>
> Watching whats going on with SQL profiler, somehow SQL gets
> generated, to update the correct table on the
> server. How can that be possible? I gave the application no knowledge
> of which table my data was coming from. Can ADO somehow get at the
> internal text of the stored procedure? Or does the returned recordset
> carry with it the names of the tables its fields came from?
>
> Next, I tried making a view and having the stored procedure select
> from the view instead:
>
> CREATE VIEW vAuthors
> AS
> select *
> from authors
>
> CREATE PROCEDURE spAuthor AS
> select * from vAuthors
>
>
> but still, SQL is somehow generated to update the underlying table.
>
>
> Could anyone enlighten me as to how this is possible?
>
> regards
> Richard
>
>
> richard@tortoise.demon.co.uk



Relevant Pages

  • App hangs using ADO to execute a SQL Stored Procedure
    ... I'm using an Access Database and ADO to call a SQL Stored Procedure to ... Set oParam = Nothing ...
    (microsoft.public.vb.database.ado)
  • Re: How can a recordset returned by a sproc be updated?
    ... While I run the test on my box I haven't seen update statement as OP said. ... > SQL Server MVP ... >> ADO. ... I tried making a view and having the stored procedure select ...
    (microsoft.public.sqlserver.programming)
  • Re: How can a recordset returned by a sproc be updated?
    ... With the resultset metadata is returned to the client that allows ADO and ... SQL Server MVP ... > ADO. ... I tried making a view and having the stored procedure select ...
    (microsoft.public.sqlserver.programming)
  • Could not find installable ISAM
    ... Within a stored procedure that is scheduled through SQL ... The server is using mixed mode security. ... It seems like somehow ADO on the server just ...
    (microsoft.public.sqlserver.odbc)
  • Re: Views vs Stored Procedures, whats the difference?
    ... I hope you are not suggesting you embed SQL queries into the application? ... A stored procedure logic will be exactly as fast as the algorithm you ... I understant that SQL Server supports hints. ... implementations (nestedloop, merge, hash, ..) on decent sized tables, then ...
    (comp.databases.ms-sqlserver)