Archive for the ‘Code Examples’ Category

How to use Triggers in With Flex2SQL Drivers

Monday, February 25th, 2008

The following is a simple program which inserts records on ITEM table and the HEADER.TOTAL field is updated automatically:

(more…)

How to use MS SQL Server Temporary Tables Together a Visual DataFlex WinReport Object

Sunday, February 24th, 2008

This is a simple example to how to use MS SQL Server temporary tables together a VDF WinReport object that allows improved speeds to get information using a complex statement, inserting the result on a temporary table and then show this on a WinReport object.

(more…)

Creating a SQL Database

Monday, February 18th, 2008

Code to create a database: (more…)

Fetching Date Values into DataFlex Date Field Using Embedded SQL

Monday, February 18th, 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…)

Calling a Stored Procedure Passing and Receiving a Date

Monday, February 18th, 2008

The DataFlex date format isn’t compatible with MS SQL. You must to change the way as argument is passed and/or is received.

Take a look at this sample program. You may see that the variable is declared as a string, but should be date. I’m changing the date format before call stored procedure:

(more…)