Question Guidance needed for ABL on Linux to access SQL Server.

ron

Member
Hello, ( OE 11.7.4 on Linux )

This is very much a newbie situation. I'm very familiar with Progress -- but very unfamiliar with SQL.

I need to send records from an OE database to an SQL Server database over a LAN.

We already have a number of external applications that access our OE databases (read only) -- but now I need to push data over and insert it into an SQL database.

What Dataserver product do I need? (If any)

Is there Progress documentation explaining how to do this?

Ron.
 

LarryD

Active Member
You may want to look at FreeTDS ODBC app for your Linux server. There are a number of google search articles on how to connect to SQL server from Linux.

We use it for both SQL reporting (csv files that can be loaded into OE), and also SQL inserts/updates/deletes Very easy to use and configure and script. All you need to be able to do is to know either how to write SQL queries or use google to help you with formatting/writing the SQL, which unless there are complicated joins are not difficult to learn.
 

LarryD

Active Member
Let me know if you have any questions as to setup or scripting. Also, just as an FYI, you don't have to deal with column sizes to parse any reporting.... you can have a true csv with your own defined delimiter.
 

ron

Member
Hi Larry -- the application I am dealing with will be written in Progress ABL. It will need to send records to an SQL database and insert them.
This will be a continuous process.

Can FreeTDS handle that?
 

ron

Member
Hi Larry. Can FreeTDS work directly with an ABL program? Or is it necessary to call it from (for example) Perl? Can it work in a continuous stream mode -- or only to deal with a "batch" -- or a full table?

Ron.
 

LarryD

Active Member
FreeTDS actually is a library allowing you to 'talk' natively to Micrsoft SQL db's. The explanation is well defined here.

With the installation of FreeTDS there is a utility also installed bsqldb to process SQL statements.

It is not a 'live' connection, but instead is a batch process. However, you can easily 'write' the SQL within the ABL code insert it it a variable
e.g.
mysqlcmd = 'INSERT INTO thesqltable'
+ ' (sqlfield1, slqfield2,slqfield3)'
+ 'VALUES( "1", "2", "3")'.

Then pass it into an os-command using the bsqldb. We have created a linux script with all of the particulars.

Yes, technically batch, but it can be done one insert at a time. So while not a direct insert it can do things pretty much 'live' as far as ABL goes.

We run all of it from within ABL.

Note you can also use isql for interactive, but I have no experience with that.
 
Top