Monday, July 5, 2010

FAQs – June 2010

Advantage 10 (x64) Fails on Windows 7 / Server 2008 R2

In order to install a service on a Windows 7 or Windows Server 2008 R2 machine the rights must be elevated. The install should automatically elevate it's rights, however, this is not currently working. You can right click on the Advantage 10 x64 install and choose Run as Administrator which will resolve the issue.

A fix for this issue will be available in a service release. This only affects the 64-bit version of the Advantage 10 installer, the 32-bit version elevates rights correctly.

7010 Errors

A 7010 "Problem with Advantage server file read" can occur if there is a corrupt index or memo file associated with the table. When a memo file causes the error the 7010 error may not be reported until the memo file is read or updated. Memo files are not always read upon file open. If you suspect a corrupt memo file when using ADT tables you can use AdtFix to attempt to repair the file.

If the index file is corrupt you will have to delete and rebuild the index. If your table is in a data dictionary and you have set the autocreate property to true, you can delete the index file and reopen the table. Advantage will re-create the index file using the metadata stored in the data dictionary.

Advantage Data Architect (ARC) Does Not Show Up on Screen

ARC saves the last known screen position and size when it is shut down. This is a very convenient feature since ARC will always show up in the same location when opened. However, if you are using a laptop that is normally docked to a dual monitor system ARC may open up off screen when the laptop is undocked. There are a few ways to fix this issue as discussed in this tip.

The latest service release of ARC, version 9.1.0.21, detects that it is positioned outside the current visible area and automatically moves so it can be seen. You can download the latest version of ARC by choosing Check for Updates from the help menu or downloading the latest version from the DevZone.

Derive Parameters for System Procedures

The AdsCommand object has a method called DeriveParameters which will create parameters for the command object. DeriveParameters reads the parameter information from the database making the configuration of these parameters easier. DeriveParameters is used with the StoredProcedure command type.

The DeriveParameters command only worked with stored procedures defined in the data dictionary. In version 10 support was added for the many system procedures as well. See the example below.

// Set the AppID so we can tell the clients apart
using (AdsCommand cmd = cnAds.CreateCommand())
{
  cmd.CommandType = CommandType.StoredProcedure;
  cmd.CommandText = "sp_SetApplicationID";
  cmd.DeriveParameters();
  cmd.Parameters[0].Value = "My Awesome Application";
  cmd.ExecuteNonQuery();
}

This functionality was also added to the latest service release of Advantage 9, version 9.1.0.21 which is available on the DevZone.

No comments: