ocrabbyy

ABBYY Flexicapture connect to database


I have often run database queries in ABBYY Flexicapture by connecting to dll methods that contained the database calls. I would like to have the ability to connect directly in the ABBYY rules, if possible. A relatively recent update added the ability to write the rules in C#, so I'm assuming it's possible to do this.

I have added System.Data as a .Net Reference in the Document Definition properties, but I get "The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?" when I run this line of code:

SqlConn = new SqlConnection("[My Connection String]");

I have tried adding

using System.Data.SqlConnection

above that line and it says SqlConnection does not exist in System.Data.

Has anyone had success in doing this?


Solution

  • Try this:

    using System.data.SqlClient