Visual Basic 2005.Net TableAdapters

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?R3JlZw==?=

    #1

    Visual Basic 2005.Net TableAdapters

    When using the VS Wizards to create a DataSet I select tables. Then, I use
    the TableAdapter Configuration Wizard to modify the underlying queries that
    retreive the data. What I'm wonder is, does this TableAdapter work in the
    same manner as a SQL Server Stored Procedure or View? Or, does it work like
    MS Access where it pulls all the data over and then filters it?

    Or, should I be making my data sources for the TableAdapters stored
    procedures and Views instead?

    Thank You,

    Greg Setnes
  • Ralph

    #2
    Re: Visual Basic 2005.Net TableAdapters


    "Greg" <AccessVBAnet@n ewsgroups.nospa mwrote in message
    news:9847936D-E3CB-47AD-BCB1-362406DC217F@mi crosoft.com...
    When using the VS Wizards to create a DataSet I select tables. Then, I use
    the TableAdapter Configuration Wizard to modify the underlying queries
    that
    retreive the data. What I'm wonder is, does this TableAdapter work in the
    same manner as a SQL Server Stored Procedure or View? Or, does it work
    like
    MS Access where it pulls all the data over and then filters it?
    >
    Or, should I be making my data sources for the TableAdapters stored
    procedures and Views instead?
    >
    Thank You,
    >
    Greg Setnes
    "Work in the same manner" makes it tough to give a straight answer. But if I
    understand you correctly - then No.

    Basically ADO.Net by default doesn't have a "client-side cursor". It is
    "disconnect ed". So everything, unless you do call an SP, is client-side
    processing. It depends on how the apdaptor is configured if "all the data is
    pulled over".

    Does that help? Or did I missunderstand something?

    -ralph


    Comment

    • Spam Catcher

      #3
      Re: Visual Basic 2005.Net TableAdapters

      =?Utf-8?B?R3JlZw==?= <AccessVBAnet@n ewsgroups.nospa mwrote in
      news:9847936D-E3CB-47AD-BCB1-362406DC217F@mi crosoft.com:
      What I'm wonder is, does this TableAdapter work in the
      same manner as a SQL Server Stored Procedure or View? Or, does it work
      like MS Access where it pulls all the data over and then filters it?
      It runs the query on the server, pulls the data down into a dataset.

      Comment

      • Linda Liu [MSFT]

        #4
        RE: Visual Basic 2005.Net TableAdapters

        Hi Greg,
        What I'm wonder is, does this TableAdapter work in the same manner as a
        SQL Server Stored Procedure or View?

        No, TableAdapter doesn't work in the same manner as a SQL Server Stored
        Procedure or View. In fact, they are different concept.

        A stored procedure consists of several SQL statements and compiled on the
        SQL Server. A view is based on a table and has some filter conditions. Both
        of them reside in database.

        TableAdapters provide communication between your application and a
        database. More specifically, a TableAdapter connects to a database,
        executes queries or stored procedures, and either returns a new data table
        populated with the returned data or fills an existing DataTable with the
        returned data. TableAdapters are also used to send updated data from your
        application back to the database.
        does it work like MS Access where it pulls all the data over and then
        filters it?

        No, TableAdapter pulls the data and fill the returned data into a
        DataTable. It doesn't filter the data. If you'd like to filter the data in
        a DataTable, you could use a BindingSource or DataView to do it. The
        following is a sample:

        Dim table As New DataTable
        Dim view As New DataView(table)
        view.RowFilter = "ID1"

        -or-

        Dim bs As New BindingSource(t able, "")
        bs.Filter = "ID 1"
        >should I be making my data sources for the TableAdapters stored procedures
        and Views instead?

        TableAdapters can connect to a stored procedure or view to retrieve data
        from database. In this case, you needn't config the complex queries by
        yourself to retrieve the data and it will be more efficient when retrieving
        data from database.

        Hope this helps.
        If you have any question, please feel free to let me know.

        Sincerely,
        Linda Liu
        Microsoft Online Community Support

        =============== =============== =============== =====
        Get notification to my posts through email? Please refer to
        http://msdn.microsoft.com/subscripti...ult.aspx#notif
        ications.

        Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
        where an initial response from the community or a Microsoft Support
        Engineer within 1 business day is acceptable. Please note that each follow
        up response may take approximately 2 business days as the support
        professional working with you may need further investigation to reach the
        most efficient resolution. The offering is not appropriate for situations
        that require urgent, real-time or phone-based interactions or complex
        project analysis and dump analysis issues. Issues of this nature are best
        handled working with a dedicated Microsoft Support Engineer by contacting
        Microsoft Customer Support Services (CSS) at
        http://msdn.microsoft.com/subscripti...t/default.aspx.
        =============== =============== =============== =====

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

        Comment

        • =?Utf-8?B?R3JlZw==?=

          #5
          RE: Visual Basic 2005.Net TableAdapters

          I think my question may not have been clear enough. When I initially create a
          TableAdapter I select a table, which returns all the records. Now, in some
          training materials I have been going through, they suggest I use the Query
          Builder to add filter logic to the script. Thus, I load the TableAdapters
          Query Builder and add "WHERE CustomerID = @CustomerID" so that the Table
          Adapter will only display recurds for the current customer selected. My
          question is, in MS Access, the process would pull over all the data and then
          filter it. But, in the case of SQL Server, the processing takes place on the
          server and only returns the resultset. So, in this case, does the
          TableAdapter pull over all the records and then filter the resultset, or are
          only the resultset being returned?

          Thank You.

          "Linda Liu [MSFT]" wrote:
          Hi Greg,
          >
          What I'm wonder is, does this TableAdapter work in the same manner as a
          SQL Server Stored Procedure or View?
          >
          No, TableAdapter doesn't work in the same manner as a SQL Server Stored
          Procedure or View. In fact, they are different concept.
          >
          A stored procedure consists of several SQL statements and compiled on the
          SQL Server. A view is based on a table and has some filter conditions. Both
          of them reside in database.
          >
          TableAdapters provide communication between your application and a
          database. More specifically, a TableAdapter connects to a database,
          executes queries or stored procedures, and either returns a new data table
          populated with the returned data or fills an existing DataTable with the
          returned data. TableAdapters are also used to send updated data from your
          application back to the database.
          >
          does it work like MS Access where it pulls all the data over and then
          filters it?
          >
          No, TableAdapter pulls the data and fill the returned data into a
          DataTable. It doesn't filter the data. If you'd like to filter the data in
          a DataTable, you could use a BindingSource or DataView to do it. The
          following is a sample:
          >
          Dim table As New DataTable
          Dim view As New DataView(table)
          view.RowFilter = "ID1"
          >
          -or-
          >
          Dim bs As New BindingSource(t able, "")
          bs.Filter = "ID 1"
          >
          should I be making my data sources for the TableAdapters stored procedures
          and Views instead?
          >
          TableAdapters can connect to a stored procedure or view to retrieve data
          from database. In this case, you needn't config the complex queries by
          yourself to retrieve the data and it will be more efficient when retrieving
          data from database.
          >
          Hope this helps.
          If you have any question, please feel free to let me know.
          >
          Sincerely,
          Linda Liu
          Microsoft Online Community Support
          >
          =============== =============== =============== =====
          Get notification to my posts through email? Please refer to
          http://msdn.microsoft.com/subscripti...ult.aspx#notif
          ications.
          >
          Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
          where an initial response from the community or a Microsoft Support
          Engineer within 1 business day is acceptable. Please note that each follow
          up response may take approximately 2 business days as the support
          professional working with you may need further investigation to reach the
          most efficient resolution. The offering is not appropriate for situations
          that require urgent, real-time or phone-based interactions or complex
          project analysis and dump analysis issues. Issues of this nature are best
          handled working with a dedicated Microsoft Support Engineer by contacting
          Microsoft Customer Support Services (CSS) at
          http://msdn.microsoft.com/subscripti...t/default.aspx.
          =============== =============== =============== =====
          >
          This posting is provided "AS IS" with no warranties, and confers no rights.
          >
          >

          Comment

          • Ralph

            #6
            Re: Visual Basic 2005.Net TableAdapters


            "Greg" <AccessVBAnet@n ewsgroups.nospa mwrote in message
            news:252CF7E5-0F92-4A44-A69A-FA4C2B7D38EE@mi crosoft.com...
            I think my question may not have been clear enough. When I initially
            create a
            TableAdapter I select a table, which returns all the records. Now, in some
            training materials I have been going through, they suggest I use the Query
            Builder to add filter logic to the script. Thus, I load the TableAdapters
            Query Builder and add "WHERE CustomerID = @CustomerID" so that the Table
            Adapter will only display recurds for the current customer selected. My
            question is, in MS Access, the process would pull over all the data and
            then
            filter it. But, in the case of SQL Server, the processing takes place on
            the
            server and only returns the resultset. So, in this case, does the
            TableAdapter pull over all the records and then filter the resultset, or
            are
            only the resultset being returned?
            >
            Thank You.
            >
            <snipped>

            Only the resultset is being returned.

            -ralph


            Comment

            • Linda Liu [MSFT]

              #7
              RE: Visual Basic 2005.Net TableAdapters

              Hi Greg,

              Thank you for you reply!
              in this case, does the TableAdapter pull over all the records and then
              filter the esultset, or are only the resultset being returned?

              In this case, the SQL command that the TableAdapter executes is like
              'select * from customer where customerID = somevalue', so only the
              resultset is being returned.

              If you have any question, please feel free to let me know.

              Sincerely,
              Linda Liu
              Microsoft Online Community Support

              Comment

              • Linda Liu [MSFT]

                #8
                RE: Visual Basic 2005.Net TableAdapters

                Hi Greg,

                I am reviewing this post and would like to know the status of this issue.

                If you have any question, please feel free to let me know.

                Thank you for using our MSDN Managed Newsgroup Support Service!

                Sincerely,
                Linda Liu
                Microsoft Online Community Support

                Comment

                Working...