Groups | Blog | Home
all groups > sql server (microsoft) > december 2005 >

sql server (microsoft) : SQL Server 2005 - Can't edit results from stored procedure


google NO[at]SPAM thecoles.org
12/28/2005 8:46:47 PM
In enterprise manager under 2000, I could open a table, view the SQL,
then run a stored procedure that returned data from a 2 table select
statement and edit the data. It kept me from having to build and
interface for specific updates.

I try the same trick from 2005 and the cells are read only. If I
select from a view outside the stored procedure I can edit, but the
stored procedure does the same select and it's not editable. Any way
around this? Or a new trick to let me edit the results of a stored
procedure?

Thanks

Don
Y Store Tools
12/29/2005 9:51:28 AM
Yes, it was possible before to edit data in enterprise manager that was
a select statement at the end of a stored procedure, and we never ran
into problems with locking or data problems (the actual table they are
editing the data in is only a few hundred records long and never used
in any kind of query merging with other data).

I can use update statements but basically this procedure adds some data
to a table, then pulls up the blank rows along with descriptions for
each field. I can write something in a front end for users to edit,
but it's a very specific task and this was a quick solution that didn't
require me to build a front end for it for users to edit. I guess I'm
going to have to build a front end for it.
David Portas
12/29/2005 11:35:06 AM
[quoted text, click to view]

I don't use Enterprise Manager much but I'd be surprised if it's possible to
edit the results of a stoed proc and then save the results back to the
database. That's possible for views certainly, not for procs.

However that may be, Enterprise Manager and Management Studio are both very
poor places to edit data. They are just not designed and optimized for that
purpose. They cause unnecessary locking that may block other operations. EM
also has some horrible bugs so you may risk corrupting your data.

Why don't you use UPDATE statements for updates?

--
David Portas
SQL Server MVP
--

AddThis Social Bookmark Button