Wednesday, September 23, 2020

Introduction to Clarion 11

SoftVelocity Clarion

Now that we have installed Clarion, let's take a very quick look at how to get started. Naturally, we begin with the help file (RTFM!). It contains almost all the official documentation.

Run the Clarion Integrated Development Environment (IDE), go to the "Help" Menu and select "Context Help F1". The first time you open the help it may take a short time to index itself.

Click on the "Contents" tab and choose the very first topic. As you scroll down and read it, notice that there are still references to very old versions of Clarion. This is common in the documentation, so don't be alarmed. Once you have read this page, click on the "User's Guide and Lessons" link, and from there, "Continue" to the "Introduction".
On the left of the help system you will see the table of contents, and it should show you where you are in the overall document. If not, click on the "Locate" button. As a beginner there is a lot to learn, and you may think like you know it all already (especially if you have used other database systems) but it is worth going through the introductory sections carefully to see how the Clarion system organises things conceptually. It isn't always the same as other databases.
Close the help file and return to the "Clarion PE 11" folder in the start menu.
I have highlighted two menu items that you need to know about. The "Help Files" menu has an item called "Getting Started Developing Applications" which is well worth a read, even though the screen shots are hopelessly out of date in some cases. I plan to return to this file in another blog post.
The "Documentation" menu has a PDF file called "Learning Clarion". Open it and read from page 1 to page 11
We will pick up from there in the next blog post, "Getting Started with Clarion (Part1)".

Saturday, September 19, 2020

Installing Clarion 11 on Windows 10

SoftVelocity Clarion

Clarion is a long-established database programming language and environment from SoftVelocity, but I'm a relative newbie. I have used Microsoft Access 97 since it was launched, and also integrated it with Microsoft SQL Server. But moving to Clarion has been quite a learning curve, mostly because there is a whole bunch of stuff that I need to un-learn. So I decided to document the stuff I am learning, hopefully to help others.
A lot of the concepts and methods I have used for years just don't apply to the Clarion environment. Access97 has aged gracefully, even in Windows 10, but Clarion tends to show its age more easily. It generates apps that are stable and reliable, but many of them still look like they were written in Windows 3.1 or Windows 95. Fortunately there are fixes and extra goodies for this, plus an active community of developers who are very helpful. Just don't start comparing Clarion to Visual Studio or Microsoft 365, because you will be missing the point entirely.
If you don't already have it, download and install OpenShell to get a classic style start menu.
These are the files we need to install. We will install the "Visual C++ Redistributable Packages for Visual Studio 2013" file first, because it is needed later. You may also need it for distribution with any applications you create using Clarion.

Agree to the licence terms and click "Install". We are doing a 32-bit install because Clarion is a 32-bit application. Click "Close" when the setup is successful.
Now double-click on the Clarion11PE_installer.exe

Even though we have just done the installation of the C++ libraries, click "Yes". Wait a few moments while the configuration is checked, and then click "Next" to begin the Clarion installation. Accept the license agreement and click "Next" for the Typical install.

It is best to use the default destination folder of "C:\Clarion11" and click "Next" twice, followed by "Finish". The start menu will now contain a program folder called "Clarion PE 11"

Click on the Clarion icon to start the development environment for the first time. Click "Yes" to register

Next, open the text file that contains the user name and serial number for Clarion 11. Select both the user name and the serial number and copy them to the Windows clipboard. Return to the registration screen and click the "Paste" button, which should then display the information. Click "Validate" to check the details and register the application.

You should get to the start page.

Find the Clarion icon on the taskbar, right-click and select "Pin to Taskbar". Close the development environment.
Now it's time to install the example files. Start with the oldest one first, but remember to change the destination folder to "C:\Users\Public\Documents\SoftVelocity\Clarion11" instead of "C:\Users\...\Clarion9" or "C:\Users\...\Clarion10"

If you installed more than one version of the example files, you can safely delete the older menu entries from the menu, because they do exactly the same as the "Clarion 11 Examples and Lessons" menu item.
The last item is DebugView++, an open source utility that is really helpful for debugging your code. Download the latest version from GitHub. I use the 32-bit version. Extract the DebugView++.exe from the ZIP file, or download the exe file directly, and place it in the c:\Clarion11 folder or anywhere else that you find convenient. Run it and pin it to the taskbar for easy access. It does not require installation, but you can do that too if you like, by downloading the .msi file.


Friday, September 18, 2020

Windows 10: "We can't sign into your account" easy fix.

We can't sign into your account
Recently I have encountered the Windows 10 error "We can't sign into your account", particularly after the recent Windows updates. Instead of fiddling around with multiple reboots and going into safe mode, try this first:
Step 1: Open "File Explorer" and go to the C: drive "Users" folder.
Step 2: Right-click on the folder that corresponds to the user account you were trying to log in as (i.e. DoctorZW). Select "Properties" and then "Security"
Step 3: Click on the "Advanced" button to get to the following screen:
Step 4: You will probably see that the "Owner" is set to "SYSTEM". Click on the "Change" link and type in "administrators" and click on "Check Names".
Step 5: If the administrators group can be found it will be displayed with its full name. Click "OK" and then check the box "Replace owner on subcontainers and objects" and "Replace all child object permission entries with inheritable permission entries from this object". Finally, click "OK"
Step 6: Answer "Yes" to the two confirmation dialog boxes and wait while the changes are applied. Depending on the volume of user data, this could take a long time.
Step 7: Click "OK" from the "Security" dialog box.
Step 8: Log off and try logging on as normal. If the "Log off" option is not available, then select "Restart" instead. This is important.
This approach has worked for me on all the PCs I have tried it on. Your next login should be succesful and return you to your normal desktop.