Database Programming in Basic

Community Forums/General Help/Database Programming in Basic

Chalky(Posted 2012) [#1]
In 2005 I wrote a complex tax-record program for my own use using Visual Basic 6. Although pretending to be a database, the program actually stored everything in csv files - not very elegant, but worked ok. The program has done me well over the last 7 years, but my accountant has suggested several changes/improvements which effectively require a rewrite from the ground up. This time I intend to use a 'real' database and am wondering what to use for the front end.

Since I am fast approaching 50, I don't have time to learn a new language, so am looking for a viable alternative to VB6. I have ruled out BMax/MaxGUI and Visual Studio 2010/12 is way out of my budget range (I can't use the Express edition as I will using whatever I buy to write software on a commercial basis). I downloaded the trial of Real Studio 2012, and was totally baffled by the structure of the example programs - I just couldn't fathom how they worked!

I then downloaded a demo of PureBasic - which looked and felt far more familiar (and has a pretty good form designer built in), but the supplied examples are very basic and don't really give an indication as to how easy it would be to write database frontends and reports etc. - though the manual does suggest a fairly comprehensive database library.

Has anyone used either - or know of another BASIC variant I could use that won't break my bank balance?


GfK(Posted 2012) [#2]
I'd probably opt for C#. If you're familiar with VB6, then finding your way around in C# should be pretty straightforward.


Yasha(Posted 2012) [#3]
Not to mention that ~90% of C# can be mapped to equivalent forms in VB.NET, of course.

Although either way you'll really be writing in LINQ, not C# or BASIC. This is going to be true for every database programming environment, it's merely a matter of how heavily they obscure the query language under layers and layers of API.


or know of another BASIC variant I could use that won't break my bank balance?


Probably going to catch hell for saying this here (no wait, it's true of Monkey too nowadays), but it's really not common place to pay for programming languages any more. You can safely assume a compiler for [Language X] is free until proven otherwise, because... well, the ones you pay for are such a tiny minority now that they're statistically insignificant.


JKP(Posted 2012) [#4]
I would recommend you use Sharpdevelop - basically it's a free IDE designed as an alternative to Visual Studio and allows you to code in C# and Visual Basic .NET.

.NET has built in libraries for connecting to most common types of database but there are also a large number of third-party libraries available that simplify things so that you avoid writing lots of repetitive code.

Last edited 2012


Chalky(Posted 2012) [#5]
Thanks guys. I actually discovered Sharpdevelop when Googling C# after GfK's suggestion and downloaded/installed it before loading some tutorial C# code. It does look radically different to what I'm used to with VB6 - I'm not sure if I'll be able to learn it quickly enough given my current work commitments, but I've some spare time over the Christmas break so will make a start. I suspect I will benefit from buying a book on C# programming (rather than wading through the numerous web tutorials) - if anyone can recommend one I would be very grateful.


Retimer(Posted 2012) [#6]
Microsoft VB.Net Express, or as others mentions C#. Extremely similar and very portable between eachother.


Dodo(Posted 2012) [#7]
Have a look at PowerBasic and SQL Tools if you want a BASIC language to interface with database.


D4NM4N(Posted 2012) [#8]
What GFK said, although "Visual basic dot net" is much of the same thing as C# with a more basic like syntax. (and it all compiles to the same jit code) So you might feel more at home with VB..... but imo you would do yourself a favor learning the more generalized syntax of C#
Either way they have "drivers" for most major DBs.
(another alternative is Java which is kind of same same but different although i would describe VB/C# as being a bit easier, but less cross platform, unless you use mono, but AFAIK that is C# only)

Last edited 2012


Yasha(Posted 2012) [#9]
unless you use mono, but AFAIK that is C# only


Mono is a runtime system, not a compiler. It doesn't care what language you wrote in as it only deals with CIL anyway.

There happens to be a Mono C# compiler, and no bundled compilers for VB.NET or F# (third party ones exist if you care), but this makes no difference because the whole point is it runs MSVS programs without recompilation, as long as they use Mono-supported classes (which is everything in the ECMA specification, but not everything in the Microsoft namespace; Microsoft of course make it very easy to make your program dependent on Microsoft classes, but it's not essential).


PS for anyone who actually does want to learn new things with .NET - which is offtopic for the original question, I know - forget boring old C#: F# is the way of the future.

Last edited 2012


D4NM4N(Posted 2012) [#10]
Yeah i know, I was talking about the complete mono "bundle". I have not seen anything that can deal with vb code into CIL outside the windows enviromnent.
Although i am not saying one does not exist.