Archive for February, 2009

Accessing existing non-DF tables, synonyms or views in DataFlex

Thursday, February 26th, 2009

There are two ways to do this: (1) by using INTERMEDIATE FILES and (2) by changing the root name of the Filelist entry to Universal Naming Convention (UNC) syntax.

 Using Intermediate Files (recommended)

Flex2SQL provides an easy way to generate .INT, .FD and .TAG files from an existing table or view:

 Using Flex2SQL, login to the database backend (if you are not already logged on).

Select Generate | .INT File from Table/View/Synonym from the menu. This will bring up a list of all the tables/view/synonyms that exist on the server (Figure: 10.1).

Select the tables you want to generate the intermediate file for and press OK. The .INT and .TD files will be generated and added to your Filelist with the driver prefix (SQL_DRV: or ORA_DRV:).

In order to generate the .FD and .TAG file, check the appropriate options in the “.INT File From Table Grouping” dialog to enable the file generations in Filelist | Options.

Without Using Intermediate Files
To access an existing table without generating an intermediate file, a new entry must be added in the Filelist with the root name obeying the UNC convention.

 ora_drv:\\servername\schemaname*tablename

 Where SCHEMA Name is same as the creator of the table.

Now an open TABLE_NAME command will use the table on the Oracle server.

Following our login example, to open a table called EMP created by user SCOTT (also called schema name) on an Oracle server, we will have the following entry:

 ora_drv:\\servername\scott*emp

 Where “*” (asterisk or star) is used to distinguish between schema name and table name.

Since the calls to retrieve index information from the database system are resource intensive, you might notice a slower opening of files compared to using .INT file method.

In the case of MS SQL Server, you also need to specify the database name sql_drv:\\server name\databasename*schemaname*tablename.

 Steps to Access Existing Tables Using VDF

  • Open Flex2SQL and select Generate | .INT File from Table/View/Synonym.
  • Select a table or view, and press OK. In the “Convert DAT to Table” dialog, change the available options as needed.
  • When prompted, select a Filelist slot for the file.
  • Open DBBuilder and select the file. Make sure it has the driver prefix before it.
  • The Mertech “Login” dialog pops-up. Enter the login information. After login, DBBuilder shows the file structure information.
  • Generate the Data Dictionary files (.DD files) for the table.
  • Open VDF IDE and generate a view with the view wizard using the .DD generated in the previous step.

 You are ready to compile and run your DataFlex program.

Using Auto-Reconnect in a Cluster Situation

Tuesday, February 24th, 2009

For customers who have a full blown cluster just as in database mirroring, typically when testing a failover, there is a hiccup of a few seconds. Our auto-reconnect feature has been able to detect the failover and continue working without problems.

(more…)

How and When To Use MS SQL Server Native Client

Monday, February 16th, 2009

SQL Native Client can be used rather than Microsoft Data Access Components (MDAC) to create new applications or enhance existing applications that need to take advantage of new SQL Server 2005 features such as Multiple Active Result Sets (MARS), Query Notifications, User-Defined Types (UDT), and XML data type support.

(more…)

New Flex2SQL for MS SQL Server v10.x Driver Feature: LOB Support

Monday, February 16th, 2009

BLOBs are very large variable binary or character data, typically documents (.txt, .doc) and pictures (.jpeg, .gif, .bmp), which can be stored in a database. In SQL Server, BLOBs can be text, ntext, or image data type.

(more…)

Controlling Locking Behavior With the SET_ISOLATION_LEVEL Command

Monday, February 16th, 2009

SET_ISOLATION_LEVEL controls the locking and row versioning behavior of SQL statements issued by a connection.

(more…)