Wednesday, February 5, 2014

How do I connect to SQL Anywhere 16 using LibreOffice4.2?

It is quite easy and very similar to the following:

The steps are here,
1. Start the SQL Anywhere 16 Server. Here I am starting a demo server.

When you install SQL Anywhere 16 it comes with a 'demo' database and incidentally this has not changed from the earliest version to which I was exposed.
You can connect to the 'demo' server and create an ODBC connection as shown in the next image (note that you will be using a 32-bit driver):

2. Launch LibreOfffice 4.2 from its shortcut and open the Base Database item in the suite. This opens the Database wizard as shown. Click on the third option, Connect to an existing database as shwon.

3. Choose ODBC and click Next.
In the displayed screen, click Browse to display all the ODBC connections. SAP16 is a ODBC connection to SQL Anywhere 16. For details refer to my previous links.

4. After highlighting SAP16 click OK. Click Next.

In the Set up the user authentication page displayed enter dba in the User Name box and place a check mark for the Password Required check box as shown.

5. Click Next. You can hit Test Connection and the Authetication Required window will be displayed with Userr Name as entered in the previous step. Enter the password sql and click Ok.
You should get a LibreOffice Base message that the connection was successful.

6. Click OK. You will move to Save and Proceed step as shown.

7. Accept the defauls and click Finish.
Provide a name for the ODF database and click save. The database file will be saved to the location.

The 'demo' database is now displayed as shown. Double clicking Customers table brings up the data in the Customers' table as shown (only some clolumns shown in the image).

8. You can use the menu 'insert ->Record' to insert a new row in the table which gets updated to the server as shown. The record       was entered in the above Customers table. You can verify that it is updated in the Server as shown.

No comments: