Execute a Stored Function using the SQL_SET_FUNCTION_NAME Command

May 11th, 2012

SQL_SET_FUNCTION_NAME

The SQL_SET_FUNCTION_NAME command allows you to execute a previously stored function.

Call SQL_SET_FUNCTION_NAME passing the function name and number of parameters the function is expecting. Next, pass each parameter individually using SQL_SET_FUNCTION_PARAMETER. Once all parameters are passed, execute the function with SQL_FUNCTION_EXECUTE. Finally, retrieve the result through a call to the SQL_GET_FUNCTION_RETURN.

Read the rest of this entry »

Restore Codejock Controls to Resolve Flex2SQL GUI Runtime Error

May 11th, 2012

A few customers have reported unexpected problems running the Flex2SQL GUI. Error messages have been observed indicating that the TERMLIST.CFG file is missing

 CodeJock Error 1

and/or that an unhandled program error occurred.

 CodeJock Error 2

The Problem

This problem occurs if VDF15.0 is uninstalled. Required runtime files and Codejock OCX controls, which are used by the Flex2SQL menus, are removed when VDF15.0 is uninstalled.

The Solution

1.    Move the 412045.dfr and termlist.cfg files to the bin directory:

Move from <ALLUSERSAPPDATA>\Mertech Data Systems\Flex2SQL\10.1\
To                 <ProgramFiles(x86)>\Mertech Data Systems\DB Drivers\DataFlex\bin

By default “<ALLUSERSAPPDATA>\Mertech Data Systems” resolves to:
“C:\Documents and Settings\All Users\Application Data\Mertech Data Systems” in the Windows XP environment.
“C:\ProgramData\Mertech Data Systems” in the Windows Vista and Windows 7 environments.

2.    Re-register the Codejock controls:

Start a command prompt as an administrator
CD C:\Program Files\Mertech Data Systems\DB Drivers\DataFlex\bin
Regsvr32  Codejock.CommandBars.v13.0.0.ocx
Regsvr32  Codejock.SkinFramework.v13.0.0.ocx

Fetching Multiple Resultsets using the SQL_NEXT_RESULT_SET Command

May 1st, 2012

You can enter multiple SELECT statements in a stored procedure to retrieve multiple resultsets and then use SQL_NEXT_RESULT_SET in the client code to position the reader to these resultsets.

SQL_NEXT_RESULT_SET iterates through the resultsets in order when multiple resultsets are returned. SQL_NEXT_RESULT_SET returns 0 (FALSE) if there are no more resultsets and a nonzero value (TRUE) otherwise.

Read the rest of this entry »

Working with new SQL Server 2008 data types

October 26th, 2011

DataFlex only supports five physical data types: NUMERIC, ASCII, DATE, TEXT and BINARY. The sixth, OVERLAP, is a logical type which maps to any one of the physical types. In the SQL world however, there are many different data types that the driver has to support. This is especially important when you are connecting to applications using the same SQL server as your DataFlex application but developed in other languages.
Read the rest of this entry »

New Feature: Lazy Open Mode

September 20th, 2011

Mertech’s new Lazy Open mode feature is designed to improve an application’s initialization performance by deferring table setup. Lazy Open mode delays the setup of table metadata (table, columns, indexes description) in memory until a field is accessed, even if an OPEN command is issued.

Read the rest of this entry »