Showing posts with label Acucobol. Show all posts
Showing posts with label Acucobol. Show all posts

Friday, 12 November 2010

SQL Server: How to deal with Acucobol date fields

   


As explained in a previous post, you can connect your Sql Server to an Acucobol db using AcuODBC. In the last part of the article I explained that there are performance issues when you query a linked server with OpenQuery and that it is better to import relevant data from the linked server to a Sql Server table in order to benefit from all the features available through stored procedures, triggers and so on.
I run some queries overnight  using SQL Scheduler to keep my local tables updated against the Acucobol tables, but, when importing the data, in some way I manipulate them to make them easier to query. What I found important in terms of performance, is to convert date fields from int to smalldatetime format. Furthermore, when importing data I insert into the newly created Sql Server table an identity field and set it as primary key.
Let's break down the query and I will explain it bit by bit.

Wednesday, 22 September 2010

SQL Server: connect to an Acucobol database with AcuODBC

   


In a SQL Server environment you can connect to external databases using ODBC. You can actually connect to any external database, but I will explain how to use AcuODBC to link an Acucobol database.