Results 1 to 2 of 2

Thread: Database and VB. Not so simple anymore.

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    63

    Database and VB. Not so simple anymore.

    I'm in the process of learning VB 2005 Express from VB 6.0. I realize there's a lot more functionality, but they should just call it Visual ASIC because it sure isn't for Beginners anymore.

    Anyway, the simple process below in VB 6.0 seems impossible to duplicate with VB 2005. Now there's binding sources, table adapters, etc. I've watched Microsoft videos and read Microsoft books, searched the internet, and nobody seems to have a simple database setup. Maybe it takes 30 lines of code now to do the same thing, I don't know.

    Public FootballDB As Database
    Public FootballRS As Recordset

    Set FootballDB = OpenDatabase(App.Path & "\football.mdb")
    Set FootballRS = FootballDB.OpenRecordset("Info")

    FootballRS.MoveFirst
    debug.print FootballRS!GameName
    debug.print FootballRS!Team1
    debug.print FootballRS!Team2

    I don't want to use the wizard. I don't need any controls to be data-linked. Can somebody help convert this? SIMPLY?

    Greg

  2. #2
    Fanatic Member
    Join Date
    Aug 2006
    Location
    Chicago, IL
    Posts
    514

    Re: Database and VB. Not so simple anymore.

    You can still use DAO, but I suggest you switch to ADO as jmcilhinney just suggested. It's harder (for those of us so used to DAO), but it's worth it.

    There are tons of tutorials on ADO all over the web. I can also e-mail you some sample code I use professionally for work. My preferred tutorials (the one's I learned on), are at About.com.
    Warren Ayen
    Senior C# Developer
    DLS Software Studios (http://www.dlssoftwarestudios.com/)

    I use Microsoft Visual Studio 2005, 2008, working with Visual Basic and Visual C#
    Hey! If you like my post, or I solve your issue, please Rate Me!

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