Twin Basic - what do you think?

amorosik

Member
Local time
Today, 19:07
Joined
Apr 18, 2020
Messages
438
Have any of you already 'got your hands' on the available versions or have you done any experiments?
Searching for information and using the little word 'database' you can't find much
What do you think?
 
You can use an Access database with twinBasic. This is of course super simple example using beta 546 currently. The Access version DB tested here is 2000.

I've attached the project (just 2 buttons) if you're interested.

Code:
Class Form1

    Sub New()
    End Sub
    
    Private Sub Command1_Click()
        Dim cn As New ADODB.Connection
        Dim strCon As String
        Dim rs As ADODB.Recordset
        Dim SQL As String
        
        strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\temp\cp-pms.mdb;"
        
        cn.Open strCon
        SQL = "Select * from [Project Header]"
        
        Set rs = New ADODB.Recordset
        rs.ActiveConnection = cn
        rs.CursorLocation = adUseClient
        rs.Open SQL
        
        MsgBox("Project Name: " & rs(1))
        
        rs.Close()
        Set rs = Nothing
        
        cn.Close
        Set cn = Nothing
        
    End Sub
    
    Private Sub Command2_Click()
        Dim objAccess As New Access.Application
        Dim intFormat As Integer
        
        objAccess.OpenCurrentDatabase "F:\temp\cp-pms.mdb"
        intFormat = objAccess.CurrentProject.FileFormat
        
        Select Case intFormat
            Case 2
                MsgBox("Microsoft Access 2")
            Case 7
                MsgBox("Microsoft Access 95")
            Case 8
                MsgBox("Microsoft Access 97")
            Case 9
                MsgBox("Microsoft Access 2000")
            Case 10
                MsgBox("Microsoft Access 2003")
        End Select
        
        objAccess.Quit()
        Set objAccess = Nothing
        
    End Sub
    
End Class
 

Attachments

Ok but for the basic data-bound controls?
Datagrid, textbox, combo, lisytbox....
 
You can use an Access database with twinBasic.
You can use a Jet/ACE database with any development platform that supports ODBC or DAO or ADO. Twin Basic is not special in that regard. You are NOT using Access when you use these tools and you do not even need Access installed, you just need the database engine. Web pages even use Jet as their BE database. Why? Who knows, but they do.
 
Fitting to the topic twinBasic and Access:
 
Ok but for the basic data-bound controls?
Datagrid, textbox, combo, lisytbox....

Okay, are you talking about the twinBasic that extends VB6 for Windows desktop apps or the proof of concept that a recent video was about? (since posted by Josef)
 
It might be difficult to emulate the main form-subform arrangement found in MS Access using TwinBasic.

This is because MS Access has a supporting object that interfaces between the main form and the subform. In reality, the subform is just a normal form, referred to as a subform by name only.

In MS Access, it is the subform/subreport control that manages the parent-child relationship between the two forms, giving the impression that the embedded form is a subform.
 
In any event, if you want the complete lowdown of it there is a dedicated subforum on vbforums with a pretty active community.
 
got to the vbforums site, there is a dedicated subforum for twinBasic (I'm not allowed to post links here as of yet)
 
My personal opinion about twinBasic:
TB is not a replacement for Access. For me, TB is a further development of VB6 in terms of language and a better editor.
If I want to create an application without Access, I currently use .net (C#). These are usually WPF or ASP.net applications. I'm not convinced that I want to use TB to create applications.

TB can also be used to create COM libraries that I could use in Access. (I currently write these with C# - but setting up a "clean" COM interop is an additional effort). But TB is quite conceivable for me - especially with regard to the reuse of VBA code. For example, removing frequently required classes from the VBA project and replacing them with a COM dll that was created with TB.

I like the possibility of using the TB development environment as a VBA editor replacement. If it then also enables shortened notations such as Dim Xyz As Long = 123, all the better.
 
"TB is not a replacement for Access." - correct it is just a VBA and VBA IDE replacement, not a database in and of itself. Plus, it isn't a given the tBA will even go past the POC phase.

Now, the "regular" twinBasic IDE and language has come a long way and has reached the point of being a viable language for development, IMHO, in particular if you need to extend a VB6 apps life span. Of course, not all current VB6 apps can be converted but, every week it is updated and gets closer to the goal of handling that.
 
If it could simply be a VBA Ide replacement, considering that by attaching an external db server to it it would become what Access is now, then it would already be more than sufficient
 
Good to see the progress being made with twinBASIC programming. It can already be used to replace VB6 and to create ActiveXs. Hopefully the twinBASIC for Applications proof of concept will progress too.
 
So far, however, nothing working has been seen 'connected' to a database.
 
Which database? I did a test project with an MS Access database that worked just fine.
 
An odbc connection
It would allow us to 'talk' to all the db's in this universe
I'm not up to date, can it be done already?
 
TwinBasic - what do you think?......Well firstly I think this post should be in Other Software.
Second, it appears to be an online development environment. If the internet is down, so are you. I suspect that for a serious commercial development you will need to buy the Ultimate at $39 a month, per seat as I guess that the free, or the Pro will eventually prove to be a restrictive. Or you can have a lifetime license for £5,000! TwinBasic has always seemed a little confusing with prices and versions. On GitHub the prices are Free, $4 for Team and $21 for Enterprise. Over the years the TwinBasic road map appears to change, along with its prices and never moving beyond beta from what I can see. Plus, you don't know if the monthly fee will double or treble. Then what do you do?

In Access you have a powerful RAD language designed for database development. It is not expensive and with RunTime, applications can be issued without cost to the user. TwinBasic I would guess is not designed as a database FE. But you can probably make it do the job. I have no idea of the development time but I guess it will far exceed that of Access.

I have in the past looked into alternatives to Access without a great deal of success. B4X is one in passing but whilst its manuals and support appear initially to be quite good, it is difficult to impossible to secure your code and there is not a report writer. Database support is scrappy.

I did look seriously at PureBasic, (for longer than I care to admit). That compiles the smallest EXE files you are ever likely to see. It will also share code and compile programs for Windows (x86 - x64), Linux (x86 - x64), OS X (x64, M1) and Raspberry (arm32, arm64). There is also the associated SpiderBasic for web programming. Both include SQLite and Postgre SQL built in. So on the face of it looks like just the job.
You can create a small application free, or for just €79 you get lifetime updates for all language versions. However, it is not a database development language. It has functions cobbled together to attempt that but can have huge memory problems. For instance, if you had a series of modal screens by the time you have opened the fourth you can lose control with serious memory variable issues. For a simple Datasheet/grid with just eight fields, that will be over 900 lines of code! If you want a continuous form, forget that totally. You will also need to write your own functions to do some things that Access does without effort. If you want events, you'll need to write functions to imitate them! Its IDE is just about OK but the GUI development aspect is noddy and as I say without events and a few other things. If you had say over 100 forms, the IDE will be damn hard work. If it took an experienced developer a ten days to create a working solution in Access, they'd be lucky to do the same in two months or more in PureBasic. You can use it to create small DLLs if you need them for RS232 I/O stuff though. They have a decent forum but help tends to be somewhat abrupt, with the reluctant transfer of knowledge and often somewhat esoteric. Nothing like as friendly, or helpful as AccessWorld though.

Another is Harbour, which is stable and basically an extended Clipper 5.3, if you need free of charge.
It will allow you to create console/terminal systems, TUI, GUI and web apps in Windows, Linux, Mobile, or Mac. Harbour itself has over 4,600 inbuilt functions specifically designed for databases. If you need a GUI then there are excellent forks. One GUI is developed in China and another in Russia, which may not attract general enthusiasm to download! But there are others. Harbour's Terminal, TUI or GUI versions will of default to DBF tables but via ODBC will handle SQL database with functions for SQLite etc. Harbour is totally free and generally the forks are issued on a contribution basis and usually under MIT license. If you did go down the Harbour route you will absolutely need to write your own program writer to generate 95% of the code for the screens from your application's database dictionary. If I need a console application to run as a standalone EXE, I'll use Harbour. It can be very rapid to use for data entry with only keyboard operations. All of course void of the mouse, keyboard, mouse, keyboard timewasting stuff of Windows.

I see little point in using anything except Access to handle Access databases. All of the support and maintenance are built in. In using anything else you will need to write and test things like your own compactor and corruption location and correction. Putting together filters and complex SQL queries in Access is so easy and quick. A world apart when compared to other languages. Creating complex reports is often a few minutes. Don't forget the support for Access from the forums, you'd be lucky to find any better support for any other software. Anything you want to know will have already have been asked many times.

It is my opinion if you must have an alternative to Access, then you should find another database development software system. Not maybe because something is compatible with/to VBA. My advice after all my research is to stick with MS Access for network, or terminal server use.
Unless of course you have a fairly large amount of money at your disposal to test a few buy-it-try-it alternatives. But be prepared to go many months down the line of learning and development before you find out it may well not be as good, or even suitable to your requirements.
(minor edit)
 
Last edited:

Users who are viewing this thread

Back
Top Bottom