By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,506 Members | 1,891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,506 IT Pros & Developers. It's quick & easy.

2.0 XSDs Using Stored Procedures

P: n/a
In a new 2.0 website I am developing I am using .XSD tableadapters, building
them with the wizard), and choosing the Stored Procedure option. I now
notice that when I go back to change the sql that I have no opportunity to
do so (as I do with regular sql). What is the recommended way to change an
..XSD using stored procedures? It doesn't seem I should directly change the
Stored Procedure as it works in concert with the generated methods in the
XSD, no?

More generally, what is the best practice here? I'm considering doing away
with the XSDs and just using straight stored procedures.

--
Regards,
Gary Blakely
Jan 24 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Gary,

A Stored Procedure may not only have SQL queries, it also could have
program logic there. Currenly the Visual Studio DataSet designer cann't
help you modify an existing Stored Procedure's logic, you will have to use
other database management tool to edit the Stored Procedure. Then you can
configure the DataSet to use the existing Stored Procedures accordingly.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Jan 24 '07 #2

P: n/a
Walter,
When you say "Then you can configure the DataSet to use the existing Stored
Procedures accordingly. " What do you mean?
The classes that get generated still have the old values (even with regular
embedded sql they do!). I have found that I always need to delete the whole
XSD and start over any time a mod is needed -SPs or SQL. I'm wondering
about the value of these XSDs altogether - I'm thinking that the wizard may
be useful but I should then just take the SQL or the generated SPs and use
them in code. What do you think?
--
Regards,
Gary Blakely

"Walter Wang [MSFT]" <wa****@online.microsoft.comwrote in message
news:Rf**************@TK2MSFTNGHUB02.phx.gbl...
Hi Gary,

A Stored Procedure may not only have SQL queries, it also could have
program logic there. Currenly the Visual Studio DataSet designer cann't
help you modify an existing Stored Procedure's logic, you will have to use
other database management tool to edit the Stored Procedure. Then you can
configure the DataSet to use the existing Stored Procedures accordingly.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.


Jan 26 '07 #3

P: n/a
Hi Gary,

What I meant is that you could:

1) Open the DataSet designer
2) Right-click on your DataSet, select "Configure"
3) In the "TableAdapter Configuration Wizard" dialog, you will see 4
combobox for the Select/Insert/Update/Delete operations, from each one you
could select an existing Stored Procedure to use. However you cannot change
the logic inside the Stored Procedure, you will have to use other database
management tool to modify it.
The value of the strong-typed DataSet is that it creates a TableAdapter for
you and the business objects are strong-typed.

TableAdapters are designer-generated components; they are analogous to
strongly typed data adapters. TableAdapters contain the necessary
information to connect to and query a database. For more information, see:
#TableAdapter Overview
http://msdn2.microsoft.com/en-us/lib...wx(VS.80).aspx
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jan 26 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.