[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VB.NET 2005: Updating with Stored Procedures - Best Practice

Posted on 2006-06-01
7
Medium Priority
?
224 Views
Last Modified: 2010-04-23
I'm a veteran VB.NET 2003 developer and am approaching my first VB.NET 2005 project. Many things have changed for the better in the 2005 rendition of Visual Studio. However, there is a learning curve to get into all the new (and easier things). Here is one example and I was hoping that someone can supply some examples:

Using VB.NET 2005 with SQL Server stored procedures, retrieving data from a table is extremely easy to set up. However, what escapes me at the moment and what I am having a hard time finding documentation on, is doing insert, updates and deletes with stored procedures.

Can someone give best practice examples of working with insert, update and delete stored procedures in VB.NET 2005?

Thanks,

JB
0
Comment
Question by:jsound
  • 3
  • 2
  • 2
7 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16809723
If you know how to work with Stored Procedures to do selects, then insert, update, and delete procedures are just as easy.

Bob
0
 
LVL 5

Expert Comment

by:mydasx
ID: 16809744
your sqlcommand object doesnt care what the stored procedure does.  That syntax has not changed at all.
0
 

Author Comment

by:jsound
ID: 16809895
Doing the Stored Procedures for a select is no problem. I'm still not clear on how to go aobut the others. Where do I reference the SP in the data adapter?

In 2003, this used to be fairly straight forward, as the IDE helped you out quite a bit. How has this changed for 2005?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 16810073
1) Data | Add New DataSource

   Here is the start screen:
   https://filedb.experts-exchange.com/incoming/ee-stuff/153-Data-Source-Configuration-Wizard.PNG

2) Add a connection

   New connection wizard:
   tp://https://filedb.experts-exchange.com/incoming/ee-stuff/154-New-Connection.png

3) The DataSource will let you access Stored Procedures for SQL Server.

Bob
0
 

Author Comment

by:jsound
ID: 16810156
Thanks, the screens were helpful as they confirmed what I had already used here. And they eventually helped me poke around to find the rest of the stuff.

Microsoft actually moved the configuration wizard for the data adapter into the DataSet configuration! That's where I finally ended up finding it, so I'm just documenting this for others here.

1) Got to the Solution Explorer and double click on the data set in question.
2) Assuming that a data table (using stored procedures or not) is located there, click the right mouse button on the table reference.
3) Choose Configure... to display the configuration wizard. Voila! Thats where the stored procedures for all four methods are specified.

Thanks for your help!

JB
0
 
LVL 5

Expert Comment

by:mydasx
ID: 16810344
lol
right... never used the wizards before. :)
0
 

Author Comment

by:jsound
ID: 16810424
I usually do a mixture (at least have done so in VS 2003) of using my own data connect code and using wizards. Often, the wizards are extremely helpful and I had a feeling that Microsot improved them quite a bit in VS 2005.

They can be very powerful for the simple straight on stuff. That's why I wanted to get it figured out now before I start the new project! :-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question