Results 1 to 38 of 38

Thread: [RESOLVED] VB6: Question - Databases, where do I start?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,085

    Resolved [RESOLVED] VB6: Question - Databases, where do I start?

    OK, it is a very broad question and I know that.

    I have an older VB6 application concerning the weapons, vehicles used in Normandy 1944. It was where I cut my teeth in VB6 and was converted from a VBDOS application which in turn came from an initial QB4.5 development.


    The launcher.


    The program on the desktop - under ReactOS.

    I have been re-educating myself and trying to improve my programming skills and familiarising myself with different technologies with an aim to pick up this old project of mine and converting it so that it falls in line with technologies available in the early 21st century. This allows me to slowly improve the application with what I know now and correct the flaws I built-in during its QB45 creation.

    When I was creating it initially, database technology was arcane, expensive or my knowledge was paltry/faulty. For some reason I decide to create my own DB which is really a flatfile containing records and CSV data. It had some data areas that acted as reference points to the data to allow faster access to specific areas of the DB.

    It was very quick and did the job but I was always aware that it was non-standard, potentially flaky in operation and in creating my own I was getting no experience from real-life databases.

    So, to my question: If I was to convert this database to something industry standard, cheap and easy to maintain, that is preferably FOSS and multi-platform, what would you suggest?

    The app is staying in VB6 and its future might be with RADBasic/TwinBasic, being just a GUI to a database, so it should be migratable. I need a solution that allows the app to continue to grow.

    I was stymied by the the 'loss' of VB6 when .NET came out in 2001 and all development stopped but I'd like to get this application out of the doldrums and resurrect it.

    Bearing in mind the direction outlined above, I 'd love to hear your technical suggestions.

    You'd really be helping me with this as this software was an important bit of my life and my halting development on this has remained as a negative emotional weight that I have carried around with me for decades.

    It is time to fix this app and regain my emotional equilibrium!

  2. #2
    Fanatic Member
    Join Date
    Feb 2017
    Posts
    634

    Re: VB6: Question - Databases, where do I start?

    Personally I'd stay with what you have and forget the database conversion UNLESS the objective is to learn database programming and using your application as a comparative example. Whether one uses a flat file or DB to store data is of no consequence as long as it works for your needs. One advantage of the way you are doing things is you have control. DBs come and go. If I recall correctly the first one I got involved with -- back in the DOS days -- was Revelation, then Paradox, then DB3, and so on. Like everything else in the computer industry, a particular DB eventually goes by the way side, or is merged into another product. Paradox for example became part of Microsoft Access. My2Cents
    Last edited by vb6forever; Jul 23rd, 2021 at 08:24 AM.

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Posts
    22,727

    Re: VB6: Question - Databases, where do I start?

    Databases aren't mere bags for random data.

    Unless your application can make use of relations and aggregation and queries for subsets of the information you probably don't need a database.

    People will use them anyway, look at the wild abuses of SQLite by phone apps for example. But there isn't much payback. It's just crap in a bag.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,085

    Re: VB6: Question - Databases, where do I start?

    Well, that is a very useful response and that does not jar against my sensibilities. At the time in the 90s, it was unclear as to which database I should use, if any. I am fairly sure that at that time all of them were commercial. I made the choice to create my own using some criteria that I have now forgotten completely but it may be that I was actually using my brain.

    As a flat file database, it is eminently portable I suppose and if I migrate to RB/TB then any work to migrate is likely to catered for by the new language supporting the old i/o commands.

    Perhaps I am over complicating things. Thankyou Dil. Thankyou VB6Forever.
    Last edited by yereverluvinuncleber; Jul 23rd, 2021 at 09:10 AM.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,085

    Re: VB6: Question - Databases, where do I start?

    Quote Originally Posted by dilettante View Post
    It's just crap in a bag.
    My flatfile database, I suppose, is just crap in a bag. I think we have a name for my database.

  6. #6
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    6,366

    Re: VB6: Question - Databases, where do I start?

    What you said above and what you said here:-
    Quote Originally Posted by yereverluvinuncleber View Post
    I have been re-educating myself and trying to improve my programming skills and familiarising myself with different technologies with an aim to pick up this old project of mine and converting it so that it falls in line with technologies available in the early 21st century.
    and what you said here:-
    Quote Originally Posted by yereverluvinuncleber View Post
    The app is staying in VB6 and its future might be with RADBasic/TwinBasic, being just a GUI to a database, so it should be migratable.
    Are utterly incompatible. What I'm about to say has the potential to start a war in this thread but I'm not the kind of person that tells people what they want to hear. I will tell you the truth.

    If you're serious about moving into the 21st century, you need to move far away from VB6 and never look back.

    We recently got a wake up call from our competitors that really showed us far behind we have fallen. For example, our bread and butter application is a massive POS system written in VB6. The things these kids are doing today....if we don't hunker down and update our skill and our tech, they will put us out of business there is no doubt about that. We still have time though but we HAVE to advance. There is just NO EXCUSE for us to still be deploying this aging relic in 2021. It's already producing a lot of headaches for us to try and make it work with the modern requirements of business, a problem our competitors don't have since they are using modern tech. We really dropped the ball here to be honest. But like I said, we have time so we may survive.

    As a result of this, it led me to really investigate the popular trends in software development. I've been looking at the frameworks, utilities, languages and platforms people are using to develop solutions for businesses and it is a really big world out there. As far as I can tell, the world we are heading into is a cloud based, hyper mobile and interconnected world where everyone wants to be able to do everything from anywhere. That's the reality and VB6 will not work here.

    Now, you can go the same route as Olaf and build everything yourself if you're that determined to stay with VB6 but why re-invent the wheel. If you want to get things up and running in reasonable time, you really will not have time to develop these things yourself. It would be better to simply use what has already been created. You could also wait for people like Olaf to do it but lets be real here. Olaf is one person. How could he, by himself, possibly re-invent all things that have been created by thousands of people in the open source community and by big companies like Google and Microsoft. Just look how long it took just to get a modern VB6 compatible IDE(Twin Basic). I'm a huge fan of their work but lets be real, they are only two people with perhaps the odd contributor here and there. There is only so much they can do and we are only talking about the basic IDE here, barely a drop in the bucket of what is needed to bring VB6 into the 21st century.

    So lets talk about the tech from the perspective of a application developer. What tech should you be looking at if you want to develop applications in 2021? Firstly, web applications and mobile apps are the biggest things right now. YouTube, Twitch, FaceBook and Instagram are web applications. They are not just simple websites anymore, they have become full blown applications with features you would traditionally find in Desktop applications. In fact nearly every site you visit on the internet today could be considered a web application. If you want to be on the cutting edge and never starve for work, this is where you need to go and it's where I intend to go over the next few years. You might want to look at things like Angular, React, Vue, node.js, jQuery, Blazor, ASP.Net.

    Personally, I like to be able to reuse skills I already have so I will tend towards Microsoft technologies which means I'm looking at Blazor, ASP.Net and .Net 5+. Just recently I was able to run some old VB.Net code on Linux using .Net 5 which is a perfect example of being able to re-use my skills. I didn't have to learn a thing about Linux programming which represents a massive saving in time and I'm also pretty sure that same code would work on Android and MacOS. I could save a lot of time using this technology because I can reuse skills, knowledge and code I already have. However, that's just me, you don't have to go this route.

    The non-Microsoft technologies are equally impressive. Angular and React are very mature frameworks with large eco-systems and a large number of web applications today were built with these technologies. You have languages like Python, Javascript, TypeScript, Kotlin, C#, Go and a few others I can't recall being used on the bleeding edge of today's technologies so you might want to take a look at those and maybe familiarize yourself with some of them. You have things like Flutter which seems to be quite popular for developing Android applications. It is actively being developed by Google and it's open sourced which means it will get all the latest features and bug fixes in a timely manner. I haven't even touched on modern IDEs like Visual Studio Code or the relationship between modern applications and databases. I'll touch on databases briefly since it was one of the things you mentioned. The modern trend seems to be putting databases behind public end-points and querying them using a REST API. The main advantages of this is that your database is accessible from anywhere in the world and it's internal structures are isolated from the end user which provides a level of security. The REST API itself could be outfitted with authentication mechanisms to limit access. That might sound complicated but you would be surprise how easy some of this is to set up using modern tools. You might also want to take a look at platforms like Odoo if you're into line of business applications. It's also one of the things we are looking at and it's the reason for our involvement with Linux since that seems to be it's primary back-end platform.

    I could go on and on but I think I've made my point. All in all man, it's a big world outside of just writing Windows applications in VB6. And it's very exciting and amazing. I strongly recommend you explore this world. I'm not going to lie though, it won't be easy at first and may not be easy for some time. There is a lot of foundational stuff to learn with all these different technologies, especially when you're coming from the primitive world of VB6 or even just Windows Desktop development. For example, I've been dabbling in Ubuntu for some time now and it can be quite frustrating figuring out how to do things you take for granted on Windows, both as a user and a programmer. I still have a grueling time ahead of me learning about all the massive world of web development and I'm sure it's going to drive me crazy but I'm also sure it will be worth it in the end. Please don't end up like some people, who I won't mention, bitterly griping for 10+ years about the hassles of Unicode. Unicode is a non-issue for modern technology.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,085

    Re: VB6: Question - Databases, where do I start?

    I'm so sorry Niya.

    Your answer is not one that was worth all that writing, although I appreciate the effort that you made to do so. I really mean that. The effort 100%.

    However my application already exists 90-95% and I am completing it in VB6, so that's not the question that really needs to be answered - but thankyou anyway. If I was working in the real world I wouldn't be doing any of this nor would I be here on this forum.

    And I agree, of course, no-one should set out on any new VB6 application according to current mass-thought (despite the potential future existence of RB/TB) - but I've already created five brand new VB6 apps and enjoyed the creation of each and every one so far. My choice on technology has already been made and it is clearly quite mad according to current thinking...

    Regardless, the choice has been made and it is VB6 and I really don't need dissuading from my choice. You are preaching to the "non-convertible".

    With regard to the original question, ie. the database solution, I have decided to stick with my "crap in a bag".

    Job Done I suppose. I shall mark this thread as resolved.

  8. #8
    PowerPoster
    Join Date
    Jun 2013
    Posts
    5,567

    Re: VB6: Question - Databases, where do I start?

    Quote Originally Posted by yereverluvinuncleber View Post
    The effort 100%...
    Which contained about 90% uninformed nonsense (especially with regards to "the role of VB in modern WebApps").

    It's possible since about 20 years, to develop (and rollout) modern and fast serverside Code in COM-Dlls
    (and VB6 is - to this day - the best tool to produce these COM-Dlls).

    Quote Originally Posted by yereverluvinuncleber View Post
    With regard to the original question, ie. the database solution, I have decided to stick with my "crap in a bag".
    ...I shall mark this thread as resolved.
    Sticking with "what you have" might be the "solution with the least efforts" -
    but in case you were serious with your opening-post:
    If I was to convert this database to something industry standard, cheap and easy to maintain, that is preferably FOSS and multi-platform, what would you suggest?

    The (IMO) easiest way to learn about DB-Handling is with the VB-COM-Wrapper for SQLite.

    The following code contains a complete example (Table-creation + SQL-based CRUD ... needs a reference to RC6):
    Code:
    Private Sub Form_Load()
      With New_c.Connection(, DBCreateInMemory)
        'create a DB-entity T (aka "a Table")
        .Execute "Create Table T(ID Integer Primary Key, Name Text, Age Integer)"
        
        '...the C in CRUD (creation of a new record)
        .ExecCmd "Insert Into T(Name, Age) Values(?,?)", "Fred", 33
        
        '...the R in CRUD (reading an existing record)
        With .GetRs("Select Name, Age From T Where ID=?", 1): Debug.Print !Name, !Age: End With
        
        '...the U in CRUD (updating an existing record)
        .ExecCmd "Update T Set Age=? Where ID=?", 44, 1
        'just checking, whether the Age-Update made it into the DB-Table
        With .GetRs("Select Name, Age From T Where ID=?", 1): Debug.Print !Name, !Age: End With
        
        '...the D in CRUD (deleting an existing record)
        .ExecCmd "Delete From T Where ID=?", 1
        'just checking for the success of the Delete-Op (we should get a Recordcount of 0)
        Debug.Print "Records in T:", .GetRs("Select Count(*) From T")(0)
      End With
    End Sub
    HTH

    Olaf

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,085

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Thanks Olaf, I appreciate the response. It is certainly the most technically direct and I am being pushed to RC5/6 for a number of reasons. I feel that is my ultimate destination - I have no doubt I will get there!

    My options seem to be: "crap in a bag" or some sort of an SQL solution and the RC6 wrapper makes sense as a lot of the work is done for me.

  10. #10
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    6,366

    Re: VB6: Question - Databases, where do I start?

    Quote Originally Posted by Schmidt View Post
    Which contained about 90% uninformed nonsense (especially with regards to "the role of VB in modern WebApps").

    It's possible since about 20 years, to develop (and rollout) modern and fast serverside Code in COM-Dlls
    (and VB6 is - to this day - the best tool to produce these COM-Dlls).
    I'm real tired of arguing these same old points so I'll just say this: If you enjoy painting a house using a hammer, good for you but I'll never suggest to anyone that they indulge themselves in such madness. Also, if all you've been using for 20 years is a hammer, I really wonder about who is truly uninformed here. In all these 20 years you mean to tell me you haven't found a single tool better than that 20 year old hammer? Come on now.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  11. #11
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    6,366

    Re: VB6: Question - Databases, where do I start?

    Quote Originally Posted by yereverluvinuncleber View Post
    I'm so sorry Niya.

    Your answer is not one that was worth all that writing, although I appreciate the effort that you made to do so. I really mean that. The effort 100%.

    However my application already exists 90-95% and I am completing it in VB6, so that's not the question that really needs to be answered - but thankyou anyway. If I was working in the real world I wouldn't be doing any of this nor would I be here on this forum.

    And I agree, of course, no-one should set out on any new VB6 application according to current mass-thought (despite the potential future existence of RB/TB) - but I've already created five brand new VB6 apps and enjoyed the creation of each and every one so far. My choice on technology has already been made and it is clearly quite mad according to current thinking...

    Regardless, the choice has been made and it is VB6 and I really don't need dissuading from my choice. You are preaching to the "non-convertible".

    With regard to the original question, ie. the database solution, I have decided to stick with my "crap in a bag".

    Job Done I suppose. I shall mark this thread as resolved.
    Not mad at you. Like I said, I don't practice telling people what they want to hear. I answered your question as honestly as I could. It's up to you whether you find value in it or not. You are free to make whatever choice you want.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  12. #12
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    6,366

    Re: VB6: Question - Databases, where do I start?

    Lemme touch on this real quick:-
    Quote Originally Posted by Schmidt View Post
    It's possible since about 20 years, to develop (and rollout) modern and fast serverside Code in COM-Dlls
    (and VB6 is - to this day - the best tool to produce these COM-Dlls).

    Here is a very simple, very basic HTTP Server written in plain old boring VB.Net code:-
    vbnet Code:
    1. Imports System
    2. Imports System.Net
    3.  
    4. Module Program
    5.     Sub Main(args As String())
    6.  
    7.         Dim hostName As String = Environment.MachineName
    8.  
    9.         If Not HttpListener.IsSupported Then
    10.             Console.WriteLine("Unable to start web server.")
    11.         Else
    12.             If args.Length = 0 Then
    13.                 Console.WriteLine("Please supply a host name or IP address and port in first argument.")
    14.                 Console.WriteLine("Eg. SimpleWebServer 192.168.100.46:5000")
    15.                 Console.WriteLine("Eg. SimpleWebServer localhost:5000")
    16.             Else
    17.                 Dim listener As New HttpListener
    18.  
    19.                 listener.Prefixes.Add($"http://{args(0)}/")
    20.  
    21.                 Try
    22.                     listener.Start()
    23.                 Catch ex As Exception
    24.                     Console.WriteLine("Server failed to start. Please ensure that we are trying to listen on a valid network interface.")
    25.                     Return
    26.                 End Try
    27.  
    28.  
    29.                 Console.WriteLine($"Listening for HTTP requests at {args(0)}")
    30.                 Console.WriteLine("Press any key to exit.")
    31.  
    32.                 Threading.ThreadPool.QueueUserWorkItem(Sub()
    33.                                                            Do
    34.                                                                Dim response As HttpListenerResponse = listener.GetContext.Response
    35.  
    36.                                                                Dim textResponse As Byte() = System.Text.Encoding.UTF8.GetBytes($"Hello from {hostName}")
    37.  
    38.                                                                response.ContentLength64 = textResponse.Length
    39.                                                                response.OutputStream.Write(textResponse, 0, textResponse.Length)
    40.  
    41.                                                                response.OutputStream.Close()
    42.  
    43.                                                            Loop
    44.                                                        End Sub)
    45.  
    46.                 Console.ReadKey()
    47.  
    48.  
    49.             End If
    50.  
    51.  
    52.         End If
    53.  
    54.  
    55.     End Sub
    56. End Module

    The above code was written and tested on a Windows 10 PC. It was then compiled and executed on Ubuntu 20.04 which is a one of many flavors of Linux:-



    And here is proof that it works:-


    There is nothing special about the code itself. It's typical, boring .Net code. Nothing fancy. Also note that the Ubuntu installation I'm using as of this time doesn't have anything relating to .Net installed on it. No Frameworks, no SDKs, nothing. There is also no kind of Windows emulation software like WINE running on this instance of Ubuntu. Also, though I don't have a way to test it right now, I'm fairly confident that this code can be compiled as is for MacOS. This is the power of .Net 5 and it's surrounding ecosystem(compilers, IDEs etc), we can target multiple platforms very easily and very quickly to execute normal run-of-the-mill .Net code. Good luck doing this in VB6 without jumping through a billion hoops.

    You may not have have need of this but if someone came to you with a strong background in BASIC programming looking for a way to write some server code, whether it be an HTTP Server or their own custom server type, and they told you they wanted a way to target Windows, Linux, MacOS and Android, would you honestly want them brute forcing this in VB6? Would you seriously champion that approach when you know .Net 5 can do it easily? Do you really want to encourage impressionable minds with madness like that?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  13. #13
    PowerPoster
    Join Date
    Feb 2006
    Posts
    22,727

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    There are other strong options too, for example Java. And as a transition we have the B4x products which are VB-like Basic built atop the JVM and Java libraries.

  14. #14
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    6,366

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by dilettante View Post
    There are other strong options too, for example Java. And as a transition we have the B4x products which are VB-like Basic built atop the JVM and Java libraries.
    Oh yea. That works too. Brute forcing VB6 into these worlds is just a colossal waste of time. Better to just use the tools that are made for it. I'd even go as far as saying that Java might just be far better than .Net with regards to cross platform development. However, I can't say this with any authority since I have no real experience with Java development, but it has been doing the cross platform thing in a meaningful way far longer than .Net so it's more mature. .Net only really started getting good at it relatively recently. I'd recommend Java over .Net for this reason if you don't really have strong ties to the Microsoft ecosystem. I still prefer .Net because I'm just used to it and it already does everything I need but Java is a worthy competitor.
    Last edited by Niya; Jul 25th, 2021 at 09:38 PM.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  15. #15
    Hyperactive Member
    Join Date
    Aug 2020
    Posts
    447

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Hi yereverluvinuncleber,

    I don't know if your program really needs a database. But since you have developed your own database, you only need to provide your database interface, and the enthusiasts here can rewrite and replace your database with other standard databases. I guess your own database should only belong to the desktop database, then SQLite-DB is undoubtedly the best choice (especially to prepare for the future cross-platform). Access-DB should also meet your needs (if only running on Windows).

  16. #16
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Posts
    3,210

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by Niya View Post
    Oh yea. That works too. Brute forcing VB6 into these worlds is just a colossal waste of time. Better to just use the tools that are made for it. I'd even go as far as saying that Java might just be far better than .Net with regards to cross platform development. However, I can't say this with any authority since I have no real experience with Java development, but it has been doing the cross platform thing in a meaningful way far longer than .Net so it's more mature. .Net only really started getting good at it relatively recently. I'd recommend Java over .Net for this reason if you don't really have strong ties to the Microsoft ecosystem. I still prefer .Net because I'm just used to it and it already does everything I need but Java is a worthy competitor.
    Btw, bruteforcing .Net and Java is also a collosal waste of time compared to node or python or golang or rust.

    In most of these spawning a webserver is a one-liner and is cross-platform and (some) produces single executable with no dependencies incl. no deps on Microsoft/Oracle ecosystems.

    But then some people get paid to use COBOL or batch files to do their daily work and come to online forums with real-life questions from the trenches. . .

    cheers,
    </wqw>

  17. #17

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,085

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Chaps, I did say in the first post my starting point:
    "I am converting it so that it falls in line with technologies available in the early 21st century. This allows me to slowly improve the application with what I know now and correct the flaws I built-in during its QB45 creation."

    That was the brief.

    The thing is that I am using VB6 as that is the current starting point, that is where I am and I am doing this specifically to re-acquaint myself with VB6. I already have .js experience on the web and frankly I am a little bored with the web way of doing things. Something about it all feels so un-RAD but that's just me and that is where I am.

    I am pushing VB6 as it was in the early part of the 21st C. That is the goal. The aim is I will learn and on the way I will complete and create.

    Sometimes you do things entirely for their own sake.

    1. I am also building a 128k Sinclair Spectrum
    2. I have an old Spitfire that I am tinkering with.
    3. I own and work on my old house of 1650
    4. I have a BSA motorbike
    5. I am programming in VB6

    The list should look like this:

    1. I should buy an Apple Mac
    2. I should lease a low-end EV
    3. I should rent a modern house on an estate with all the mod cons
    4. I should purchase a Japanese bike that starts
    5. I should program in anything other than VB6...

    When I go looking for help on what brick to use on my old house (Imperial Norfolk Red) I don't want to be told I should clad it in aluminium or knock it down and use cinder block/metric brick as the old bricks are non standard and will just lead to problems.

    I think that SQLite seems to be my solution in one way or another and I may go down this route. Let's close off the perennial battle with old/new technologies and let's settle on a good solution for the problem at hand.

    Thankyou.

  18. #18

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,085

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    I reckon this is closed now.

  19. #19
    PowerPoster ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    2,821

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by yereverluvinuncleber View Post

    Sometimes you do things entirely for their own sake.

    1. I am also building a 128k Sinclair Spectrum
    2. I have an old Spitfire that I am tinkering with.
    3. I own and work on my old house of 1650
    4. I have a BSA motorbike
    5. I am programming in VB6

    The list should look like this:

    1. I should buy an Apple Mac
    2. I should lease a low-end EV
    3. I should rent a modern house on an estate with all the mod cons
    4. I should purchase a Japanese bike that starts
    5. I should program in anything other than VB6...
    I would like to add to the List

    6. I still have my 190 2.5 Liter Mercedes Diesel bought in 1991, it's got 965.000Km on the Clock, I'm going for the 1 Mio.Km

    other List
    6. I know I should buy a E-car whatever make, but I doubt if this will ever reach 1 Mio. Km

    so old technology isn't always bad, use what get's the Job done.
    to hunt a species to extinction is not logical !
    since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.

  20. #20
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    6,366

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by wqweto View Post
    Btw, bruteforcing .Net and Java is also a collosal waste of time compared to node or python or golang or rust.

    In most of these spawning a webserver is a one-liner and is cross-platform and (some) produces single executable with no dependencies incl. no deps on Microsoft/Oracle ecosystems.
    </wqw>
    It would take all of 10 minutes to produce .Net code that could spawn a web server in one line. I've even done it years ago in VB6 with pure TCP sockets using that awful Winsock control. Took a little longer since I have to parse the HTTP myself but still relatively trivial. Writing simple web servers are not a big deal in any language. Brute forcing only means something when you have to spend a non trivial amount of time attempting something when there is another tool that can do it in only a fraction of the time. It's very trivial to target multiple platforms using .Net, Java or the ones you mentioned, node.js and python. Doing this in VB6 is non-trivial and would require far more effort in comparison as such it would be madness to try.

    A good rule of thumb is if the effort required to do something feels like threading a needle in the dark or painting a 3 story house with a toothbrush, then you might be using the wrong tool. Now, some of you really enjoy threading needles in the dark and more power to you. But understand that this is a very abnormal way of thinking. Most people, when they see a screw, they get a screwdriver. They won't go out of their way to use a pair of pliers.

    Also, the application I posted in post 12 was deployed on Ubuntu as a single executable with zero dependencies:-
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  21. #21
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    6,366

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by SearchingDataOnly View Post
    Hi yereverluvinuncleber,

    I don't know if your program really needs a database. But since you have developed your own database, you only need to provide your database interface, and the enthusiasts here can rewrite and replace your database with other standard databases. I guess your own database should only belong to the desktop database, then SQLite-DB is undoubtedly the best choice (especially to prepare for the future cross-platform). Access-DB should also meet your needs (if only running on Windows).
    If he really wants to keep it VB6, he can use Olaf's RichClient framework. I think I recall seeing him post some code that utilized a very simple in memory database he built into the framework.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  22. #22
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Posts
    3,210

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by Niya View Post
    If he really wants to keep it VB6, he can use Olaf's RichClient framework. I think I recall seeing him post some code that utilized a very simple in memory database he built into the framework.
    There is a a built-in web server class in RC6 and in-memory sqlite support. Can't compile this to a single exe though.

    Speaking of minimal .Net, this reminded me of the Minimal .Net Web Server with Regex Routing in 177 LOC of C# effort of mine.

    cheers,
    </wqw>

  23. #23
    Hyperactive Member
    Join Date
    Feb 2015
    Posts
    290

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by yereverluvinuncleber View Post

    The app is staying in VB6 and its future might be with RADBasic/TwinBasic, being just a GUI to a database, so it should be migratable. I need a solution that allows the app to continue to grow.
    twinBASIC have announced that the first full version of twinBASIC will be available in 2-3months (there is a preview version available now, of course). This will include a GUI forms designer, though it isn't clear yet how much of an existing VB6 app can be migrated to tB (full VB6 backwards compatibility is some months later). This will also have 64bit support.
    Later still, cross platform support for Linux, Mac and Android will be added.

  24. #24
    PowerPoster
    Join Date
    Feb 2006
    Posts
    22,727

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    The seas are littered with the flotsam of Whizzy Basic languages.

  25. #25

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,085

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by VB6 Programming View Post
    twinBASIC have announced that the first full version of twinBASIC will be available in 2-3months
    Precisely! That is why I think that remaining with a flatfile DB (Bag o'crap) for the present may be a good idea as it will work almost anywhere as long as TB's RB's VB6 i/o functions are replicated.

    Remember my software was written in the 90s and it still works and in all that time it has avoided all the evolution convolutions that any 3rd party database might have introduced as the technology matured. My software is almost as stable as VB6!

    On a PM, a saintly type has suggested that I abstract my own tool's database access methods to allow easy conversion to any database that I should choose in the future. I think it is really good advice. Thanks Peter!

  26. #26

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,085

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by dilettante View Post
    The seas are littered with the flotsam of Whizzy Basic languages.
    Agreed, completely. VB is extremely stable isn't it?

  27. #27

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,085

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by ChrisE View Post
    190 2.5 Liter Mercedes Diesel bought in 1991
    Good car, chain timing I believe. No rubbish belts there. I was fond of the 190, compact and reliable.

  28. #28
    PowerPoster
    Join Date
    Jun 2013
    Posts
    5,567

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by wqweto View Post
    Btw, bruteforcing .Net and Java is also a collosal waste of time compared to node or python or golang or rust.
    Yep, that's (IMO) what Niya does not keep strictly separated currently (what exactly runs client- or serverside in a modern SinglePage-WebApp).

    To write a modern WebApp, "starting a local Debugging-WebServer" is a base-necessity that goes without saying.
    (and it's one, which can be accomplished in VB6 in 3 lines of code as well).

    As for choosing client- and serverside languages (and libs/frameworks) -
    basically any combination works (with more freedom of choice with serverside languages, including VB6).

    Our current WebApps run the SAP (UI5) framework clientside (plain JS-based Controls, no HTML) -
    the DataBinding-(Paths) then mapped to (JSON-)resultsets, which are delivered by (ajax-based)RPCs which address:
    - the IIS (as the Public facing WebServer-instance)
    - plus local NodeJS/express-instances behind PM2 (as the internal routed to "localhost WebAPI"-layer)
    - the routing to the local NodeJS-instances priorily configured in the IIS (via ARR- and UrlRewrite-modules)
    - NodeJS then internally working with JavaScript as the serverside "main-langauge"
    - COM-Objects (still) used for complex DB-Layer-stuff via NodeJS' winax-module (installed via NPM)
    ..(with the plan to reduce these COM-dependencies over the next months and years)

    In the meantime (based on this setup), we have a working "lowcode-solution" ready,
    which runs on Desktop- and all Mobile-Browsers,
    (working for the most parts "declaratively", just setting up entities/entity-Props-and-Fields plus entity-hierarchies).

    The serverside COM-parts in this setup are still fully debuggable in the VB6-IDE.

    We started with this stuff already about 8 years ago -
    (delegating to the COM-Dlls via VBScript from *.asp-files, not incorporating NodeJS at that time) ...
    The main-point being, that we did not waste a minute of our time with any ".NET-migration-attempts", but instead "skipped it entirely".

    Olaf

  29. #29

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,085

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Well, this is DEFINITELY not a web app so these additions are as off-topic as the Mercedes 190 timing chain drive.

    So, here's a picture:


  30. #30
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    6,366

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by Schmidt View Post
    Yep, that's (IMO) what Niya does not keep strictly separated currently (what exactly runs client- or serverside in a modern SinglePage-WebApp).

    To write a modern WebApp, "starting a local Debugging-WebServer" is a base-necessity that goes without saying.
    (and it's one, which can be accomplished in VB6 in 3 lines of code as well).

    As for choosing client- and serverside languages (and libs/frameworks) -
    basically any combination works (with more freedom of choice with serverside languages, including VB6).

    Our current WebApps run the SAP (UI5) framework clientside (plain JS-based Controls, no HTML) -
    the DataBinding-(Paths) then mapped to (JSON-)resultsets, which are delivered by (ajax-based)RPCs which address:
    - the IIS (as the Public facing WebServer-instance)
    - plus local NodeJS/express-instances behind PM2 (as the internal routed to "localhost WebAPI"-layer)
    - the routing to the local NodeJS-instances priorily configured in the IIS (via ARR- and UrlRewrite-modules)
    - NodeJS then internally working with JavaScript as the serverside "main-langauge"
    - COM-Objects (still) used for complex DB-Layer-stuff via NodeJS' winax-module (installed via NPM)
    ..(with the plan to reduce these COM-dependencies over the next months and years)

    In the meantime (based on this setup), we have a working "lowcode-solution" ready,
    which runs on Desktop- and all Mobile-Browsers,
    (working for the most parts "declaratively", just setting up entities/entity-Props-and-Fields plus entity-hierarchies).

    The serverside COM-parts in this setup are still fully debuggable in the VB6-IDE.

    We started with this stuff already about 8 years ago -
    (delegating to the COM-Dlls via VBScript from *.asp-files, not incorporating NodeJS at that time) ...
    The main-point being, that we did not waste a minute of our time with any ".NET-migration-attempts", but instead "skipped it entirely".

    Olaf
    lol...the .Net ecosystem can cover all that by itself. No need to be jumping around between all these different technologies. To each his own I guess.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  31. #31

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,085

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Look, when someone asks a specific question, the subject of which is quite clear in the OP it should not become a battlefield between competing uses of technology that have almost nothing to do with the original question.

    If you want to battle it out in the great .NET vs VB6 debate then please do it elsewhere. Web apps, my arse (is just as on topic)

    I am really tired of certain people hijacking others threads to sell their own opinions. Please in future, keep on topic, on track and argue your repetitive arguments elsewhere. I'm not naming anyone, you know who you are.

    I would suggest pistols at dawn but NOT on my lawn.


  32. #32
    Frenzied Member
    Join Date
    Nov 2017
    Posts
    1,657

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    I'm entering the fray just to point this out:

    Quote Originally Posted by yereverluvinuncleber View Post
    OK, it is a very broad question and I know that.
    Quote Originally Posted by yereverluvinuncleber View Post
    Look, when someone asks a specific question, the subject of which is quite clear in the OP ...
    Otherwise I agree with you. The merits of writing VB6 code in 2021 and beyond has been beaten to death here a multitude of times over. Some people are going to keep doing it, and other people apparently are incapable of accepting that.

  33. #33
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    6,366

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by OptionBase1 View Post
    The merits of writing VB6 code in 2021
    lol....What merits? This is the entire point. There is none I can see which is what all this is ultimately about for me.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  34. #34
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    6,366

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by wqweto View Post
    Speaking of minimal .Net, this reminded me of the Minimal .Net Web Server with Regex Routing in 177 LOC of C# effort of mine.
    That's pretty cool.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  35. #35
    Frenzied Member
    Join Date
    Nov 2017
    Posts
    1,657

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by Niya View Post
    lol....What merits? This is the entire point. There is none I can see which is what all this is ultimately about for me.
    Fantastic.

  36. #36

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,085

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    I think on all my future threads I will ask Niya and Olaf specifically not to comment. It is just too stressful for the rest of us that have to watch the ensuing battle. Take it elsewhere.

    Honestly Niya, I think you can be more disruptive to a thread than xi..yi..o

    You damage the forum.

  37. #37
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    6,366

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    Quote Originally Posted by yereverluvinuncleber View Post
    I think on all my future threads I will ask Niya and Olaf specifically not to comment. It is just too stressful for the rest of us that have to watch the ensuing battle. Take it elsewhere.

    Honestly Niya, I think you can be more disruptive to a thread than xi..yi..o

    You damage the forum.
    lol...
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  38. #38
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    36,461

    Re: [RESOLVED] VB6: Question - Databases, where do I start?

    I appreciate the views, and the way they were stated: Emphatically, but one and done. Still, this thread has been resolved and is going off anything that could be considered rails, so I'm closing it.

    We're never going to have an answer to the broader question of which technology to use.
    My usual boring signature: Nothing

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