This section describes how to add Filemaker, MySQL and SQLite data sources to Lasso 9.
Adding data sources to Lasso 9 is quicker and simpler than Lasso 8.x as there is only one place you need to go in the Lasso Server Admin to give your code access to your databases. The following example shows you how to create a MySQL data source.
Login to the Lasso 9 Server Admin for your web site (ex. https://www.example.com/lasso9/admin/). If you have not yet configured an administrator user, it should prompt you to do so (see the Installation Guide for more details).
Once logged in, click on the silver tab to the left and select the "Datasources" menu option.
The resulting page lists the various options for connecting to various databases. You'll note that "SQLiteConnector" already has one host — this is where Lasso 9 stores various preferences, sessions, and other Server Admin functions.
For this example, click MySQLDS to reveal the MySQL hosts and the option to add more hosts. Click the "Add host" button to reveal the options for setting up a host.
Fill in the information and click "Add Host." The following information belongs in each of the fields:
Name: The domain name or IP address of your database server.
Port: The port your server is listening on. MySQL defaults to port 3306, so if you do not know which port, try 3306 for MySQL.
Username: This is the database user you wish to use for authenticating to the database.
Password: This is the password for the database user that you are using for authentication to the database.
Enabled: This is whether or not you want to enable this host to be used by Lasso. You want to leave this as "yes."
Once you click "Add Host," the page will refresh its contents. Click once again on MySQLDS and you will see the host you just created. Click on the host and it will reveal a list of available databases. If you click on a database, it will reveal the tables in that database ("moose" and "hair" in the example below) as well as give you the option disable access to that particular database and change the alias for that database. (The alias is the database name you use in the -database= option in an inline statement. See the Language Guide for more information on the inline tag.)
Please note that the databases and tables you see will correspond to the privileges setup for the database user you used in step 5 to connect to the database. Please see the documentation for your database to learn how to manage users and privileges for that database.
You have now setup databases in Lasso 9 Server Admin that can be accessed in your code through the use of the inline(-database='database_name' ...) tag. (See the Language Guide for more information on the inline tag.)
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.