Results 1 to 5 of 5

Thread: Data controls different in vs 2003 - 2005 ?

  1. #1

    Thread Starter
    Lively Member mikelynch's Avatar
    Join Date
    May 2006
    Location
    Goombungee Qld
    Posts
    83

    Data controls different in vs 2003 - 2005 ?

    The vs 2005 Data components are reduced here see , I am trying to
    work with example tutorial that uses a much creater selection than available here !


    Attached Images Attached Images  

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Data controls different in vs 2003 - 2005 ?

    What are you after that you cant find?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Data controls different in vs 2003 - 2005 ?

    Nothing from 2003 has been removed, they just aren't displayed in the Toolbox by default. The DataGrid is not displayed because the DataGridView is better in almost all cases. The BindingSource and BindingNavigator are both new. All the provider-specific classes like SqlConnection and OleDbDataAdapter still exist but they are not included in the Toolbox because you are intended to use the new Data Sources feature that makes their direct use obsolete. You can certainly use them if you like though, and many people do. Like any components, if you want to use them in the designer you simply right-click the Toolbox, select Choose Items and then navigate to the library containing the components you want to use.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Lively Member mikelynch's Avatar
    Join Date
    May 2006
    Location
    Goombungee Qld
    Posts
    83

    Wink Re: Data controls different in vs 2003 - 2005 ?

    I was trying to emulate this old vb example --->

    Code:
            Dim strValue As String
            Dim Sql As String = "select pkRoomID,fldStatus from tblRoom where fldStatus = False"
            Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\VilliageDatabase\Ainslie.mdb"
            Dim adapter As New OleDbDataAdapter(Sql, strConn)
            Dim ds As New DataSet
            Dim intR As Integer
            intR = adapter.Fill(ds)
    For the moment I will stick with it. I just added
    Code:
    using System.Data.OleDb;
    which works. , I didnt have the namespace completed right through.

    thanks. I will look into other ways of implementation.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Data controls different in vs 2003 - 2005 ?

    As I said, you can add the OleDbConnection and OleDbDataAdapter components to the Toolbox if you so desire. Microsoft would prefer you to create a Data Source for your database though, which would generate a typed DataSet including TableAdapters. Your DataSet class and TableAdapter classes will then be automatically added to the Toolbox and you can drag them to forms as needed. The TableAdapters take the place of untyped OleDbDataAdapters and the connection is incorporated into each one already.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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