Archive for the ‘Development Tools’ Category

Using Native Client with v10 Flex2SQL MS SQL Server

Tuesday, April 21st, 2009

The v10 SQL Server drivers exclusively use the SQL Server native client libraries.  This is the approach MS is taking and is evident by the fact that almost all new features in SQL 2008 can only be accessed through the native client.

However, as with all things Microsoft, things are not always that simple! In our testing, we have seen anamolies that shouldn’t be there but are. For example, in previous version, we could be sure that older versions of the OLEDB providers would work with newer versions of SQL Server. Simple right?  Not so with the native clients.

When  it is necessary to match up the various versions of  native client versions with the versions of SQL Server. Here is what we recommend:

If you are connecting to  SQL Server 2005,  you can use Native Client 2005 or Native Client 2008 installed.
If you are connecting to  SQL Server 2008,  you MUST use Native Client 2008.  You cannot use the Native Client 2005.

So what does this mean? If your customer has upgraded to SQL Server 2008 without informing you and now are experiencing “weird” behavior  with your application, tell them to make sure they install the Native Client for SQL Server 2008.  And yes, Microsoft wants you to intsall the native client because it is too much for them to just provide a single client connection library like MySQL or PostgreSQL!

The Flex2SQL v10 installation comes with a native client installation, for your convenience.

How to Set DataBase Name at Login in Flex2SQL for PostgreSQL and MySQL

Thursday, March 12th, 2009

Sometimes it can be a problem accessing remote servers from the Internet which does not allows access to control databases but just for your database.

(more…)

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 Oracle XE 10g Client

Sunday, March 16th, 2008

Oracle 10g XE Client is different from the client that XE server install for you, first of all with XE Client we don’t get the same configurations files that we get in a XE server. No tnsnames.ora, you need to use another notation to connect to a remote server also the windows registry keys are stored in another Windows registry directory. (more…)

How to Login to Server and Call a DataFlex Program

Sunday, February 24th, 2008

SQL Server databases has its own date format. This is a clean way to receive date columns from a statement (stmt) directly to a DataFlex (DF) Table.Field or a Date Variable.

(more…)