Friday, January 1, 2010

FAQs – December 2009

Advantage Data Architect Command Line

You can open a table or data dictionary using a command line argument for Advantage Data Architect. ARC will open and use the default connection settings to connect to Advantage and open the specified object. You will be prompted for your credentials if they are required when a data dictionary is specified.

ARC Command Line Arguement

Clipper with Windows 7

Although Windows 7 is not yet officially supported by Advantage, you may need to run an existing Clipper based application on a Windows 7 client. This can be done using Windows 7 XP Mode, which is a virtual Windows XP environment.

You can get detailed instructions from this knowledgebase article.

Setting NOT NULL Constraints With a CREATE TABLE Statement

You can specify constraints on data dictionary bound tables with a CREATE TABLE statement. To do this you must use the CONSTRAINT keyword when specifying the constraint. Some servers support defining constraints without using the CONSTRAINT keyword. In the case of specifying whether or not a field can be NULL there are some slight differences.

Many data modeling tools generate DDL statements to create a database based on the model. These statements may look like the following.

CREATE TABLE MyTable ( PK Integer NOT NULL, Name Char(50) NULL, HireDate Date NULL, Salary Money NULL )

This query would create a table with four fields and the PK field must contain a value. Some small modifications to the statement are required to work with Advantage. The default is to allow NULL for all fields in a table, therefore you do not need to specify the NULL. Additionally you must use the CONSTRAINT keyword when specifying the NOT NULL constraint. The following statement will create the same table in Advantage.

CREATE TABLE MyTable ( PK Integer CONSTRAINT NOT NULL, Name Char(50), HireDate Date, Salary Money )

No comments: