Xbasic Guide - An introduction to Xbasic
A guide to Xbasic for web and mobile application developers.
Alpha Anywhere is a powerful application development software package. Most of what you need to do can be built in Alpha Anywhere without writing any code. That being said, server-side scripts can extend the core functionality that comes with Alpha Anywhere to incorporate data validation, create workflows, or build complex server-side routines to automate reporting, business processes, and more. In Alpha Anywhere, Xbasic is used to create server-side scripts to perform various tasks.
This guide assumes you are already familiar with Alpha Anywhere and understand how to create workspaces and connection strings.
The goal of this guide is to give you a solid grounding in basic programming concepts needed to use Xbasic to customize your Alpha Anywhere applications to your exact business requirements. You can refer to the Alpha Anywhere Documentation to explore everything Xbasic can do. The best way to learn different Xbasic commands and techniques is through experimentation.
In this guide, we will cover the topics listed below. At the end of each section, you will find a "Next" button you can click to take you to the next section.
- The Interactive Window
- Variables and Data Types
- Conditional Statements
- Loop Statements
- Arrays, Object Pointer Variables, and Collections
- Capturing and Logging Errors
- Working With SQL Data Using Xbasic
- Calling Xbasic Scripts in Your Applications
- The Xbasic Debugger
Before you begin, you need to create a new Alpha Anywhere workspace and a connection string named "AADemo-Northwind," which is used later in this guide to interface with the sample Northwind database included in the Alpha Anywhere installation.
1. Launch Alpha Anywhere
2. Create a new Workspace named "XbasicGuide."
1. Open the Web Projects Control Panel
2. Select Tools > AlphaDAO Connection Strings
3. Click the "Create AADemo-Northwind Connection String" link at the bottom of the window.
4. Confirm creating the connection. Then, return to the Web Projects Control Panel.