jsound
asked on
VB.NET 2005: Updating with Stored Procedures - Best Practice
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
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
your sqlcommand object doesnt care what the stored procedure does. That syntax has not changed at all.
ASKER
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?
In 2003, this used to be fairly straight forward, as the IDE helped you out quite a bit. How has this changed for 2005?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
lol
right... never used the wizards before. :)
right... never used the wizards before. :)
ASKER
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! :-)
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! :-)
Bob