Results 1 to 4 of 4

Thread: [2005] Database, IDE vs Me...

  1. #1

    Thread Starter
    Hyperactive Member cptHotkeys's Avatar
    Join Date
    Apr 2007
    Location
    New Zealand
    Posts
    294

    [2005] Database, IDE vs Me...

    Hi
    I have always use databases in my applications by manualy querying the DB and populating lists and combo box's, is this manual databinding?

    Also I have never used the IDE to add a datasource, I watched a video tutorial once and thaught doing it manualy appeared to be easier and more dynamic, So naturally I turned a blind eye to the DataSource stuff in a project and to databinding and datasets etc (I hate wizards), i pretty much always just use datareaders. I realize that if I do things manualy I need to keep an eye on the DB for changes (if multiuser system)... What are the other cons of doing things my way or the more conventional "Add a datasource" way. It doesnt seem to me to have many benifits, but I obviously dont know much so I need some advice as I dont want to form a bad habbit and waste time and effort when the "Other" way is easier or better suited...

    Signatures suck

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: [2005] Database, IDE vs Me...

    When it comes to VB.NET 2005, the stigma that used to be placed on the "automated" way and using the wizards for data access kinda disappeared. With the advent of type-specific datasets, much of the problems with data binding were taken care of.

    Personaly I still prefer to do it the old-fashioned way, primarily because for me it's faster to make changes and get things updated. As for which is better suited... it's like asking which is better to swat a fly with: a hammer or a baseball bat. Both will accomplish the same thing to varying degrees... it's about the right tool for the right job and what you are most comfortable with. I don't mind dealing with the guts of data, so that's the way I do it.

    Others are more comfortable having that stuff hidden from them. It's a preference thing.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

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

    Re: [2005] Database, IDE vs Me...

    I've worked on my own ever since I started in .NET so most of my stuff has been relatively small scale. I recently created my first 3-tier application. In my DAL I had the IDE generate a typed DataSet with TableAdapters. It saves a lot of time both in the initial setup and later, due to the fact that you get Intellisense everywhere.

    In the BLL I had each of my business objects wrap a typed DataRow from that DataSet. I then declared typed-collection classes for each of my business objects, so when I loaded the data from my DAL I wrapped each row in a business object, added that to a collection then passed the collection on to the PL. There the collection was bound via a BindingSource to one or more controls.

    All the members of the business objects that dealt with the rows or tables from the DataSet were declared Friend, so the PL never saw them. I highly recommend using Data Sources and data-binding. They are big time-savers, and isn't that what we use an IDE for? Obviously if you're used to, and happy with, the "old" way then by all means stick with it, but you should NOT do so just because you think there's something inherently wrong with the "new" way.
    Last edited by jmcilhinney; Jul 20th, 2007 at 08:31 PM.
    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
    Hyperactive Member cptHotkeys's Avatar
    Join Date
    Apr 2007
    Location
    New Zealand
    Posts
    294

    Re: [2005] Database, IDE vs Me...

    Thanks guys.
    The awnser is clear "Try it and find out"...

    Signatures suck

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