Results 1 to 16 of 16

Thread: database for classic vb 6.0 aside from MS access?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2010
    Posts
    20

    database for classic vb 6.0 aside from MS access?

    Hello guys. I'm a newbie. I've made a simple VB project for our office using VB6.0 and MS Access. Sadly my access got lost after the IT team installed office 365 on my computer. I am looking for an alternate for MS Access that is 'free'? can i install xamp and use mysql as local database? The program i'm trying to make is pretty much add-edit-delete-search with some reports. Just to make some tasks in the office faster.

    out topic: I've been trying others (winforms and sharpdevelop) but I don't know how to connect to the database. youtube says add 'microsoft server database' but nothing shows in the list. where do i go to create one? is it free? is it kept over the internet or a local database?

  2. #2
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,684

    Re: database for classic vb 6.0 aside from MS access?

    Office 365 has an "Option" for Access, too. Just tell your IT to install it
    (I would know, since i do have Office365 with Access)

    As for alternatives for vb6: sqlite in conjunction with RC6.
    Maybe Olaf (author of RC6) will chip in here.

    Or even maybe TwinBasic. No idea about DB-Support there
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2010
    Posts
    20

    Re: database for classic vb 6.0 aside from MS access?

    Thank you for your response. Unfortunately, the office365 was personal, not the subscription. Finally I was able to come across a tutorial on how to use C# and MySQL via Visual Studio 2022. Looking good so far
    Thank you again.

  4. #4
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,684

    Re: database for classic vb 6.0 aside from MS access?

    Quote Originally Posted by cherrydee View Post
    Thank you for your response. Unfortunately, the office365 was personal, not the subscription. Finally I was able to come across a tutorial on how to use C# and MySQL via Visual Studio 2022. Looking good so far
    Thank you again.
    You do know, that for working with vb6 accessing "mdb"-(Access)-Databases, you don't need Access in reality?
    IIRC, vb6 had something along a minimalistic "JET-Databases"-Tool-Thingy (or was it VB5?)
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  5. #5
    Fanatic Member BenJones's Avatar
    Join Date
    Mar 2010
    Location
    Wales UK
    Posts
    714

    Re: database for classic vb 6.0 aside from MS access?

    you can use ado in vb6 for reading and createing databases you don't need access you can even use dao that a bit old now but easy to use you can need to add the reference. if your database is small you can also use db3 files there is a fair few engines that have been written in vb6 to access db3 files just do a google. here is a tut for ado

    https://www.w3schools.com/asp/ado_ref_command.asp

    here is a small vb dbeditor i made with vb6 using dao
    https://github.com/Planet-Source-Cod...-v1-0__1-71867

    here is some small projects I made using ado
    https://github.com/Planet-Source-Cod...mples__1-61429

    hope that gets you started.

  6. #6
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,209

    Re: database for classic vb 6.0 aside from MS access?

    Quote Originally Posted by cherrydee View Post
    Hello guys. I'm a newbie. I've made a simple VB project for our office using VB6.0 and MS Access. Sadly my access got lost after the IT team installed office 365 on my computer. I am looking for an alternate for MS Access that is 'free'?
    You can still use Access format databases (.mdb or .accdb) with VB6 without Access needing to be installed. They are known as Jet (or ACE) databases and can be used with either DAO or ADO.

    Your existing VB project should be able to work with the database you have already created. Just place the .mdb or .accdb database in the appropriate location and run your VB6 app.

    VB6 also included a utility called VisData to allow you to modify .mdb databases.

  7. #7
    Frenzied Member
    Join Date
    Jun 2015
    Posts
    1,118

    Re: database for classic vb 6.0 aside from MS access?

    i've been using the sqllite odbc driver for most things now. (there are also several libs in codebank to use sqllite more directly through an activex dll)

    http://www.ch-werner.de/sqliteodbc/

    there is a great free query browser to manually create/ manage/ explore the databases

    https://sqlitebrowser.org/

    one bug of the odbc driver is seems like you can only access a record set field once or it may throw an error so use variables like id=rs!id and don't mouse over the rs!id while debugging. slightly annoying but, or use the dlls from code bank they have special build requirements though so might have to use precompiled.

    wamp server install and mysql works fine just install the mysql odbc driver for your server version, it's just a little heavy to run the server i used to love mysqlfront for db management but it was abandoned. mysqltools isn't my favorite ui.

    the sqllite is just a single file no server which is great.
    Last edited by dz32; Aug 14th, 2024 at 07:27 AM.

  8. #8
    Fanatic Member BenJones's Avatar
    Join Date
    Mar 2010
    Location
    Wales UK
    Posts
    714

    Re: database for classic vb 6.0 aside from MS access?

    Quote Originally Posted by VB6 Programming View Post
    You can still use Access format databases (.mdb or .accdb) with VB6 without Access needing to be installed. They are known as Jet (or ACE) databases and can be used with either DAO or ADO.

    Your existing VB project should be able to work with the database you have already created. Just place the .mdb or .accdb database in the appropriate location and run your VB6 app.

    VB6 also included a utility called VisData to allow you to modify .mdb databases.
    I used to use VisData it was a good tool if you don't have access I am not sure also if it was the VB4 CD or VB5 that they gave the sourcecode for that program I know I seen it on a CD somewere you can learn a lot of things from it, shame someone did not update it was a good tool.

  9. #9
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,209

    Re: database for classic vb 6.0 aside from MS access?

    Quote Originally Posted by Zvoni View Post
    Or even maybe TwinBasic. No idea about DB-Support there
    The twinBASIC programming IDE offers the same options as VB6.
    There is a sample project in twinBASIC showing how to use a SQLite3 static library.



    Krool does have a SQLite library.
    https://www.vbforums.com/showthread....-(COM-Wrapper)

  10. #10
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,439

    Re: database for classic vb 6.0 aside from MS access?

    Yeah, I read your OP, but only skimmed the replies.

    My first (and, IMHO, excellent) thought is to just use the DAO (v3.6) and/or the ADO (v2.8), and continue using the MS-Access structure for your database. Both the DAO and ADO are pre-installed with pretty much all versions of modern Windows, and they're free.

    Then, to read your database, I see two options (and both could be used together). Option #1, write your "view" interface in VB6, showing users what they need to see.

    And, Option #2, use something like MDBPlus, which is freeware that can be used to view (and do some editing of) MS-Access databases.



    Done that way, you have no need for the MS-Access program at all, and you still get all the benefits of an MS-Access database. This is truly an excellent way to go.

    And, personally, if this is just a local-machine database (or maybe on a small LAN), I'd stick with MDB files (as opposed to ACCDB files). They're very bullet-proof, and just more compatible.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  11. #11
    Fanatic Member
    Join Date
    Feb 2019
    Posts
    770

    Re: database for classic vb 6.0 aside from MS access?

    It sounds like you were using the older DAO and something uninstalled its DLL, or unregistered it. Please open your VBP file with Notepad, and post the lines that begin with "Reference=" here.

    DAO was recommended over the newer ADO because it was tightly optimized to the files that it supported, such as MDB files. Look for "dao360.dll" in your system if you were using it. Here is where it is in my system, Win10 64-Bit:

    Library DAO
    C:\Program Files (x86)\Common Files\Microsoft Shared\DAO\dao360.dll
    Microsoft DAO 3.6 Object Library

    ADO has been included with the OS since Windows 2000, and its files protected from XP to 11, and so are the VB6 runtime. DAO and ADO are similar, but not the same. Both have "Recordset" object, but not with the same properties and methods. You can use both by using the fully qualified names, like:

    Set rs1 = New DAO.Recoredset
    Set rs2 = New ADODB.Recoredset

    I suggest you try to fix DAO first, before converting to ADO.

  12. #12
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,439

    Re: database for classic vb 6.0 aside from MS access?

    Now I've read the replies. And yes, if you want to go with a SQL-server approach (as opposed to a database "file" approach), something like MySQL or SQL-Lite (or, I'd tend to go with the MariaDB fork) is an excellent option. And all of that is free as well, but probably will require a re-write of what you've got, and another learning curve.

    The upside is that SQL-server databases are much more expandable than MDB or ACCDB files, especially when you start approaching the 2GB file size limit, and/or get into a large multi-user situation, or want to implement over a WAN. But, for many of us, those aren't things we need to worry about. MDB and ACCDB files can get around the 2GB limit by simply splitting our tables into multiple files, rather than shoving them all into a single file. And they also do quite well in something like a LAN with, say, a 10-simultaneous-user limit on things.

    Also, just to say it, you'll get plenty of support on these forums for any of these approaches.
    Last edited by Elroy; Aug 14th, 2024 at 08:36 AM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  13. #13
    PowerPoster
    Join Date
    Jan 2020
    Posts
    4,180

    Re: database for classic vb 6.0 aside from MS access?

    Quote Originally Posted by VB6 Programming View Post
    The twinBASIC programming IDE offers the same options as VB6.
    There is a sample project in twinBASIC showing how to use a SQLite3 static library.



    Krool does have a SQLite library.
    https://www.vbforums.com/showthread....-(COM-Wrapper)
    There is a sample project in twinBASIC showing how to use a SQLite3 static library.?what's download link?

  14. #14
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,209

    Re: database for classic vb 6.0 aside from MS access?

    Quote Originally Posted by xiaoyao View Post
    There is a sample project in twinBASIC showing how to use a SQLite3 static library.?what's download link?
    It is under the 'Samples' tab when you choose 'New Project' in the twinBASIC IDE.

    Name:  SQLite.png
Views: 87
Size:  16.9 KB

  15. #15
    Hyperactive Member
    Join Date
    Mar 2019
    Posts
    455

    Re: database for classic vb 6.0 aside from MS access?

    You can install mysql and use adodb and myOdbc connector just fine.

  16. #16
    PowerPoster
    Join Date
    Jan 2020
    Posts
    4,180

    Re: database for classic vb 6.0 aside from MS access?

    Quote Originally Posted by vb6 programming View Post
    it is under the 'samples' tab when you choose 'new project' in the twinbasic ide.

    Name:  SQLite.png
Views: 87
Size:  16.9 KB
    thank you

Tags for this Thread

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