Quantcast
Channel: Smartsourcing Global Inc.
Viewing all articles
Browse latest Browse all 10

SiMX TEXTConverter with MySQL

0
0

SiMX TextConverter with MySQL
We have used SiMX TextConverter tool for parsing PDFs and it is a brilliant tool. It uses MSSQL by default. We needed to use this tool for a system that uses MySQL and the ride was not smooth.
The objective of this article is to share the steps required for connecting SiMX TextConverter with MySQL .

Connect SiMX TextConverter to MySQL DB
SiMX TextConverter is a 32 bit application and it is very important to understand that a 32 bit application will need a 32 bit DSN on a 64 bit machine.

Install MySQL ODBC Driver
As of today the latest version of MySQL ODBC Driver is 5.1.11. Download 32 bit version of the driver from http://dev.mysql.com/downloads/connector/odbc/ location.

DSN
If you know the steps to create the DSN click here to skip this section
Once the driver is installed, make sure you can connect to MySQL via CLI or any GUI client.

  • In Run Command window execute following command

%windir%\syswow64\odbcad32.exe

  • To create a System DSN (which will be available to all users), select the System DSN tab. To create a User DSN, which will be unique only to the current user, click the Add… button.
  • Select the ODBC driver for this DSN.

  • You now need to configure the specific fields for the DSN you are creating through the Add Data Source Name dialog

In the Data Source Name box, enter the name of the data source to access. It can be any valid name that you choose.

  • In the Description box, enter some text to help identify the connection.
  • In the Server field, enter the name of the MySQL server host to access. By default, it is localhost.
  • FIll in username and password.
  • The Database pop-up should automatically populate with the list of databases that the user has access to.
  • Click Details >> button to expand the dialog box with advanced options.
  • Select Cursors/Results from the tabs
  • Check on “Force use of forward-only cursors”
  • Click OK to save the DSN.
  • A completed DSN configuration may look like this:

Integrate DSN with SiMX TextConverter

  • Run the TextConverter
  • Open “Set Output DB Table” dialog by click the “Set output table name by” button in Output window

  • You will see the DSN(s) you have created

  • If you come across following error dialog, please double check your DSN configuration

So far so good, you must be thinking “that was easy”. We encountered bunch of problems starting this point and it took us hours to figure out the solution. We needed hours because SiMX TextConverter error messages were not helpful at all in reporting the issue. As you can see, if the DSN is not configured correctly, the dialog box (as shown above) doesn’t help.

SiMX TextConverter Issues and Solutions

Issue: SiMX TextConverter will crash if your table names are more than 8 characters long.
Solution:

  • To fix this crash you can either shorten all the table names to 8 characters maximum OR
  • Move to MySQL ODBC Connector version 5.1.10 OR
  • Switch off “Append to Existing table”

Issue: SiMX TextConverter will crash with following error message if you try to connect to database at runtime.

Solution: Manually set DB for each input variable (DBCreator). Here is an example code snippet
Step1 : Click on DBCreator.

Step2: Click on “Set output table name”

Step3 : Select the DSN.

Step4: Select the table from the DSN.

Issue: Multiple delete query results in following error dialog

Solution: Combine multiple delete queries into one. You will need to change the template code to achieve this by introducing where clause in the delete query and have the logic in the clause.

Issue: We observed the SiMX TextConverter with “Append to Existing Table” flag on ran without any issues, however, when MySQL was remote (on a different machine) SimX TextConverter did not respond.
Solution: Re-installing the ODBC Driver and it worked!
Issue: If you create User DSN, you will not be able to deploy your solution on IIS
Solution: Create a System DSN
Issue: DB connection is very slow.
Solution :

  • Run following command in command line.

mysql> SET GLOBAL query_cache_size = 16777216;

  • Make sure you DSN has following settings.

Issue : DB connection is very slow in 64 bit machine (in my case it’s windows 7).
Solution: Set value of following paramenter in my.ini/my.cnf file.
innodb_buffer_pool_instances = 0

Information : To see the query log , Select the following option in your DSN.

I hope this articles helps developer(s) trying to use SiMX TextConverter with MySQL


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images