Results 1 to 2 of 2

Thread: Loading record from SQL Server DB.

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Loading record from SQL Server DB.

    This is a question to see other peoples techniques for a simple bit of code.
    I am intregued as to which methods people opt for.

    I have a DLL project called SvrObjects.
    In this is a class called Users.
    This class has 2 functions called FetchUser and FetchUsers, which is in the format:
    VB Code:
    1. 'function for editting user data
    2. Public Function FetchUser(ByVal ID As Integer) As 'some object
    3. Dim obj As 'some object
    4.  
    5.    'code to load user record from DB
    6.  
    7.    Return obj
    8. End Function
    9.  
    10. 'function for display users info
    11. Public Function FetchUsers() As 'some object
    12. Dim obj As 'some object
    13.  
    14.    'code to load user record from DB
    15.  
    16.    Return obj
    17. End Function

    I would like to know what methods people would use and what objects they use to pass the data back to the UI.

    Woof

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Loading record from SQL Server DB.

    How about you start?

    I return a dataset in most cases, and in most cases I'm working with a datagrid, so it's simply a matter of .DataBinding() it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width