VB 2008 / SQL Server 2008 - Recordset Retrieval via Stored Proc.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: VB 2008 / SQL Server 2008 - Recordset Retrieval via Stored Proc.

Hybrid View

  1. #1
    Join Date
    Jul 2008
    Posts
    4

    VB 2008 / SQL Server 2008 - Recordset Retrieval via Stored Proc.

    I'm pretty new with Visual Studio 2008 but have done VB6 development for the past 8 years straight.

    I'm trying to figure out how to rewrite a couple of personal VB6 apps. at home just for fun and for a learning experience w/VB 2008.

    I typically don't retrieve any data into my VB apps. w/just straight SQL queries... I always utilize stored procedures in SQL and call those via the VB apps... much cleaner VB coding that way in my opinion.

    (I'm talking about Windows Forms development here... just an FYI...)

    I can't for the life of me figure out the exact syntax that I'll need to use in Visual Basic 2008 in order to (for example) retrieve a list of values, let's say, into a combobox. I can do that in my sleep in VB6, but I'm just behind the learning curve w/the syntax in .NET to do that.

    Anyone have any specific code snippets/examples that they could post for me in knowing the appropriate syntax to use in retrieving records into a recordset in VB.NET via a SQL Server stored procedure?

    Many thanks!

  2. #2
    Join Date
    Dec 2004
    Posts
    163
    bmccollum,

    Is there a reason why you want to use ADO with VS2008 instead of ADO.Net?

    Kerry Moorman

  3. #3
    Join Date
    Jul 2008
    Posts
    4

    ADO.net

    I'm perfectly fine using ADO.Net... as I mentioned before, I'm way behind the learning curve in having been doing VB6 development for so long, so I'm likely unaware of several new/preferred technologies with VB 2003/2005/2008.



    Quote Originally Posted by kmoorman
    bmccollum,

    Is there a reason why you want to use ADO with VS2008 instead of ADO.Net?

    Kerry Moorman

  4. #4
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  5. #5
    Join Date
    Jul 2008
    Posts
    4

    Unbound Recordsets

    I typically use unbound recordsets (aka disconnected recordsets) in VB6... do you have the choice of bound/unbound recordsets in VB.net 2008 or are they all unbound, all bound, etc?

  6. #6
    Join Date
    Dec 2004
    Posts
    163
    bmccollum,

    Recordsets as such don't exist in ADO.Net.

    ADO.Net is a completely disconnected data architecture. There is no direct support for server-side cursors, etc.

    You might want to start by looking into ADO.Net's connection, command and datareader classes.

    Another area to invesigate is ADO.Net's dataadapter, dataset and datatable classes.

    Also keep in mind that the various data access classes are grouped together based on the particular database being accessed. So, for example, SQL Server uses the SQLClient namespace with its SQLConnection, SQLCommand and SQLDataReader classes. MS Access uses the OleDb namespace with its OleDbConnection, OleDbCommand and OleDbDataReader classes. Etc.

    Kerry Moorman

  7. #7
    Join Date
    Jul 2008
    Posts
    4
    Many thanks for all of the helpful postings... I'll check into the various items/links a few of you posted... thanks again...

  8. #8
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Hopefully you will find this helpful with respect to ADO.NET
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. SQL Server Express Mng. Studio and VB
    By GHETTO.CHiLD in forum .NET
    Replies: 0
    Last Post: 04-20-2007, 09:59 AM
  2. Stored Procedure SQL Server 2000
    By Michael in forum Database
    Replies: 2
    Last Post: 03-17-2005, 12:07 PM
  3. VB & SQL Server as a package
    By Pete in forum Database
    Replies: 1
    Last Post: 02-14-2002, 02:58 PM
  4. Retrieving Recordset from Oracle Stored Proc
    By Kermit Goodman in forum VB Classic
    Replies: 1
    Last Post: 12-21-2000, 08:14 PM
  5. SQL server administrative knowledge
    By Becky in forum Database
    Replies: 1
    Last Post: 07-11-2000, 04:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center