Microsoft Visual FoxPro 7.0 Readme
This document contains last minute notes from the Microsoft Visual FoxPro product team. The information in this Readme is more up to date than the information in the online documentation.
For the latest information about Visual FoxPro, please visit the Visual FoxPro home page at http://msdn.microsoft.com/vfoxpro.
For information about new features and changes since previous versions of Visual FoxPro, see the "What's New" section in the online documentation.
Note If you have installed a beta version of either Visual FoxPro 7.0 or Visual Studio.NET, you must uninstall that product before installing the full version of Visual FoxPro 7.0. Additionally, you should run the VFPCLEAN.APP utility the first time you launch Visual FoxPro 7.0 after installation.
1. Getting Started with Microsoft Visual FoxPro
1.1. System Requirements
Visual FoxPro has the following minimum system requirements:
- Processor Pentium class
- RAM 64 MB (recommended: 128 MB or higher)
- Available Hard Disk Space 115 MB (200 MB for the maximum installation)
Note Visual FoxPro cannot be installed to a mapped drive. You must install Visual FoxPro on a local hard drive.
- Video 800 x 600, 256 colors (recommended: High Color 16-bit)
- Operating System Microsoft Windows 2000, Windows NT 4.0, Windows Me, or Windows 98
Note Installation on Windows NT 4.0, Terminal Server Edition is not supported.
1.2. Installation
Visual FoxPro requires you to be an administrator on the local computer to install and use all the provided tools effectively.
1.2.1. Installing Visual FoxPro
If you have installed a beta version of either Visual FoxPro 7.0 or Visual Studio.NET, it is important that you uninstall that product before installing the full version of Visual FoxPro 7.0. In addition, the first time you launch Visual FoxPro 7.0 after installation, you should run the VFPCLEAN.APP utility. For more information, see "Using the VFPCLEAN.APP Utility" later in this Readme.
You might want to configure a Windows 2000 or Windows NT 4.0 Server computer with Internet Information Server (IIS) if you plan to use Visual FoxPro for publishing Web Services. Refer to your operating system documentation for instructions on setting up and configuring IIS.
Note The Visual FoxPro Setup application requires Microsoft Internet Explorer 5.0 to run. If you are installing Visual FoxPro on a machine with a version of Internet Explorer earlier than 5.0, the CD will display the VFPStart.htm page, which only provides steps for installing Visual FoxPro. Part of the Visual FoxPro installation process is the Windows Component Update, which installs Internet Explorer 5.5 if an earlier version is found. After this version of Internet Explorer is installed, the CD will launch the VFPStart.hta application with additional Setup options, including InstallShield, MSDE, and the SOAP Toolkit.
To install Visual FoxPro
- Close all open applications.
- Insert the Visual FoxPro CD, and the VFPStart page displays automatically. From this page, you can install the components that are included with Visual FoxPro.
- Select the Install Visual FoxPro 7.0 link on the VFPStart page. This opens the Visual FoxPro Installation wizard. Follow the instructions in the Installation wizard.
- In the Installation wizard, click Windows Component Update to install required system components. This might require one or more computer restarts.
- Click Visual FoxPro to install the Visual FoxPro components.
- In the Features list, verify the Visual FoxPro components you want to install.
Note Visual FoxPro cannot be installed to a mapped drive. You must install Visual FoxPro on a local hard drive. Do not attempt to use the "map network drive" functionality inside the Setup program.
1.2.2. Installing Additional Applications
Visual FoxPro includes copies of additional software that you can install and use with Visual FoxPro. These include:
- InstallShield Express Limited Edition makes it possible to package and deploy the applications you create using Visual FoxPro
- Microsoft SQL Server 2000 Desktop Engine (MSDE) provides a personal version of SQL Server
- Microsoft SOAP Toolkit 2.0 makes it possible to consume and publish Web Services in Visual FoxPro
- Microsoft Developer Network (MSDN) Library provides a wealth of developer information
To install InstallShield Express
- Insert the Visual FoxPro CD, and the VFPStart page opens automatically. From this page, you can install the components that are included with Visual FoxPro.
- Select the Install InstallShield Express link on the VFPStart page. This opens the InstallShield Express Installation wizard.
- Follow the instructions in the Installation wizard.
The Setup.exe file for InstallShield also can be located in the InstallShield folder on the Visual FoxPro CD.
To install SOAP Toolkit 2.0
- Insert the Visual FoxPro CD, and the VFPStart page opens automatically. From this page, you can install the components that are included with Visual FoxPro.
- Select the SOAP Toolkit 2.0 link on the VFPStart page. This opens the SOAP Toolkit 2.0 Installation wizard.
The soapsdk.msi and soapsamp.msi files for the SOAP Toolkit also can be located in the SOAPToolkit folder on the Visual FoxPro CD.
To install MSDE
- Insert the Visual FoxPro CD, and the VFPStart page opens automatically. From this page, you can install the components that are included with Visual FoxPro.
- Select the Install Microsoft SQL Server Desktop Engine (MSDE) link on the VFPStart page. This option installs MSDE without an Installation wizard. You will be asked to verify your selection to install MSDE.
The Setup.exe file for MSDE also can be located in the SQLMSDE folder on the Visual FoxPro CD.
To install MSDN Library
- Insert MSDN CD 1, and MSDN Installation wizard opens automatically.
- Follow the instructions in the Installation wizard.
The Setup.exe file for MSDN also can be located in the root folder on the MSDN CD 1.
2. Known Issues
This section lists known issues in this release of Visual FoxPro.
2.1. General Issues
- Bookmarks are related to the editor window rather than content. During an edit session, bookmarks are related to the position within the window and not to the actual content of the file. Consequently, certain edit operations, such as text insertions before a bookmark, cause that bookmark to relate to a different line than the one with which it was previously associated. If the new line association is not desirable, you should remove the existing bookmark or shortcut and add a new one in the desired location.
- Displaying white space in editors. You can display spaces, tabs, and paragraphs as characters in the currently active editor. Paragraph markers (line feeds) display only if the word wrap option is enabled. To display white space, on the Format menu, select the View White Space option.
Note The View White Space feature is not supported on Double Byte Character Set (DBCS) platforms.
- Updating menus to Visual FoxPro 7.0 format cannot be undone. Before you update a menu created on a previous version of Visual FoxPro to the Visual FoxPro 7.0 format, it is recommended that you make a backup copy of it, because you cannot convert a Visual FoxPro 7.0 menu back to the older format.
- Context Help for new Solutions samples is not available. Documentation for the new samples is not available using F1. To locate information about the new samples, open the Visual FoxPro online documentation, and use the Index tab to search for the title of the sample form.
- Redistibutable files statement corrected. The online Help topic "Removing Restricted Visual FoxPro Features and Files" contains a section under the heading "Redist.txt" with incorrect information. The contents of the Redist.txt section should read:
Visual FoxPro contains many files that are licensed for your use for design, development, and testing purposes only. See Redist.txt, located in your Visual FoxPro directory, for a list of redistributable files. If your application contains files other than these listed files and files authored by you, remove them. Under the terms of the Microsoft License Agreement you received with this product, you cannot ship these files in your application or on your disks.
- ActiveX Control Help is not part of Visual FoxPro. To access online Help for ActiveX controls, you must install the MSDN Library.
- COM errors in Web Services are often related to the SOAP Toolkit. Visual FoxPro supports Web Services through a set of extensions (Visual FoxPro Foundation Classes) that wrap native COM objects supplied by the SOAP Toolkit. You should refer to the Toolkit documentation regarding potential issues of working with Web Services. COM errors returned from a Web Service are often related to an issue with the SOAP Toolkit objects. For example, if you are trying to access an external Web Service on the Internet from inside a firewall, you might receive a COM error if a firewall client is not installed on your local machine.
- Additional changes to Visual FoxPro are not listed in the What's New Help topic. The following behavior has changed since previous versions of Visual FoxPro.
- Visual FoxPro 7.0 does not include the startup application, VFP7STRT.APP.
- The nStartPos parameter of the ASCAN( ) function will generate an error only if you pass it a value of 0. If you pass a value larger than the array length, the function returns 0.
- In Visual FoxPro 7.0, spaces in long table names are preserved in the CREATE TABLE command as well as in the Table designer. In previous versions of Visual FoxPro, the CREATE TABLE command would substitute underscore characters if the table name specified by the NAME clause included spaces.
2.2. Language Element Issues
- Syntax for LOCATE command revised. In the online Help, the topic for the LOCATE command contains incorrect information. The correct syntax for the LOCATE command is the following:
LOCATE [FOR lExpression1] [Scope] [WHILE lExpression2] [NOOPTIMIZE]
- INPUTBOX( ) function updated. The syntax for the INPUTBOX( ) function includes the new cTimeoutValue parameter, and the behavior of the Cancel button differs from the description in online Help. The correct information is as follows:
Syntax
INPUTBOX(cInputPrompt [, cDialogCaption [, cDefaultValue [, nTimeout [, cTimeoutValue ]]]] )
Parameters
…
cTimeoutValue
Specifies the value to return if a timeout occurs.
Remarks
The dialog box displays an edit box and OK and Cancel buttons. The OK button always returns the contents of the text box. The Cancel button always returns an empty string. A timeout returns the specified text in cTimeoutValue or an empty string if cTimeoutValue is not passed.
- PictAlignment property has been removed. This property does not exist in Visual FoxPro 7.0.
- The nFlag value in GETDIR( ) function topic is missing. In the online Help, the GETDIR() Function topic is missing information about nFlag=32. The following value should be an element in the nFlags table:
| nFlag |
Value |
Description |
| 32 |
BIF_VALIDATE |
Validates the edit box contents. If the edit box is used, it is necessary to validate the user-specified content. If the user types an invalid name into the edit box, the Cancel button becomes the only selection available. This flag is ignored if BIF_EDITBOX is not specified. |
- DEFINE CLASS syntax has been corrected. The syntax statement for DEFINE class is corrected to the following, with the changed section in bold:
DEFINE CLASS ClassName1 AS ParentClass [OF ClassLibrary] [OLEPUBLIC]
[IMPLEMENTS cInterfaceName [EXCLUDE]
IN TypeLib | TypeLibGUID | ProgID ]
[[PROTECTED | HIDDEN PropertyName1, PropertyName2 ...]
[Object.]PropertyName = eExpression ...]
[ADD OBJECT [PROTECTED] ObjectName AS ClassName2 [NOINIT]
[WITH cPropertylist]]
[[PROTECTED | HIDDEN] FUNCTION | PROCEDURE Name[_ACCESS |_ASSIGN]
([cParamName [AS type] [@]]) [AS type]
[HELPSTRING cHelpString] |
THIS_ACCESS(cMemberName)
[NODEFAULT]
cStatements
[ENDFUNC | ENDPROC]]
[PEMName_COMATTRIB = nFlags | DIMENSION PEMName_COMATTRIB[5]
[PEMName_COMATTRIB[1] = nFlags
PEMName_COMATTRIB[2] = cHelpString
PEMName_COMATTRIB[3] = cPropertyCapitalization
PEMName_COMATTRIB[4] = cPropertyType
PEMName_COMATTRIB[5] = nOptionalParams]]
ENDDEFINE
- Designer Value Tips of EditorOptions property. Designer Value Tips are the information tips associated with items in drop-down controls and lists. These include the following:
- Fields in data source lists (tables and views) in Database, View, and Form (Data Environment) designers
- Methods and events in Form and Class designer method editor procedure drop-down controls
- Left Outer Join returns zero records on nulls. If a Left Outer Join uses Upper(<variable name>), and the variable is null, zero records will be returned. This is a change from the incorrect behavior in Visual FoxPro 6.0, which returned a single record.
Because there were several instances where SQL SELECT statements could return incorrect result sets in previous versions of Visual FoxPro, several changes were made in Visual FoxPro 7.0. You should verify that your SQL SELECT statements return expected result sets.
- Retrieval of Unicode into ANSI has been changed. Previous versions of Visual FoxPro were able to return invalid results when retrieving data from SQL Server Unicode columns (NTEXT, NVARCHAR), because of failed attempts to convert Unicode column data to an ANSI code page. When these translations failed, Visual FoxPro substituted a "?" for the two-byte Unicode character sequence.
To avoid possible data corruption, Visual FoxPro 7.0 has changed this behavior. In this version, when data is returned from these columns, the raw, unconverted text is placed into a memo field in the Fox cursor. Because SQL Server stores helptext in an NVARCHAR(255) column in the syscomments table, information retrieved by issuing an sp_helptext 'some subject or sp' command will contain embedded NULLs for the second byte of each Latin character.
If the helptext for this subject contains only Latin characters, you can use the enhanced version of the Visual FoxPro STRCONV( ) function to translate the Unicode data to a viewable representation,
Note Visual FoxPro 7.0 cannot display true multi-byte Unicode or UTF-8 (non-Latin) characters.
- Additional STRCONV( ) parameters enable base64 encoding. The STRCONV( ) function now supports two additional options for the nConversionSetting parameter:
| nConversionSetting |
Conversion |
| 13 |
Converts single-bytes in cExpression to encoded base64 binary. |
| 14 |
Converts single-bytes in cExpression to decoded base64 binary. |
Example
? STRCONV("ABC",13) && Encode the string to base64 "QUJD"
? STRCONV("QUJD",14) && Decode this string "ABC"
Note Base64 encoding in Visual FoxPro is intended to encode only binary data.
- APROCINFO( ) function Return value missing from documentation. The documentation does not include the Return value for this function. The APROCINFO( ) function returns a numeric value, the number of rows in the created array.
- GETINTERFACE( ) cannot find interface in DLL. When a DLL is built on a Windows 9x platform (Windows 95, Windows 98, and Windows Me), Visual FoxPro does not include the type library inside the DLL. When you use GETINTERFACE( ) and refer to a DLL built on one of these platforms, you must use the Type Library name instead of the DLL name as in the following code:
oX = GETINTERFACE(x, "lmycklass1.tlb") && works for DLL built on any Windows platform
You can use the following code for a DLL built on Windows 2000 or Windows NT:
oX = GETINTERFACE(x, "lmycklass1.dll")
2.3. XML Support Issues
- Code page translation in the CURSORTOXML( ) function. When you use nFlag=16 in CURSORTOXML( ), output is set to the code page of the cursor. To ensure accurate character translation under this selection, the Visual FoxPro default code page must match the code page of the cursor. To accomplish this, set character and memo fields in the cursor to NOCPTRAN (character binary/memo binary).
When you use nFlag=16 with tables using any of the code pages listed in the following "Additional code page support in the CURSORTOXML( ) Function" entry, the encoding attribute in the XML will be set to an empty string, (""). Use the STRTRAN( ) function to change to the correct encoding attribute. For example, for Code Page 936, provide the following to the resultant XML string:
strxml=STRTRAN(strxml,'encoding=""','encoding="gb2312"')
- Additional code page support in the CURSORTOXML( ) function. The CURSORTOXML( ) function supports the following code page in addition to those listed in online Help.
| Code Page |
Platform |
Encoding Attribute in XML Declaration |
| 936 |
Traditional Chinese |
gb2312 |
In addition, the encoding attribute for the following code pages is changed from that listed in online Help.
| Code Page |
Platform |
Encoding Attribute in XML Declaration |
| 437 |
US-MS-DOS |
ibm437 |
| 850 |
International MS-DOS |
ibm850 |
| 865 |
Nordic MS-DOS |
(empty string) |
| 866 |
Russian MS-DOS |
cp866 |
CURSORTOXML( ) does not support the following code pages, even though these code pages are supported by Visual FoxPro's data engine.
| Code Page |
Platform |
Encoding Attribute in XML Declaration |
| 10000 |
Macintosh |
macintosh |
| 10006 |
Greek Macintosh |
x-mac-greek |
| 10007 |
Cyrillic Macintosh |
x-mac-cyrillic |
| 10029 |
East European Macintosh |
x-mac-ce |
| 874 |
Thai Windows |
windows-874 |
| 861 |
Icelandic MS-DOS |
ibm861 |
- Mapping XSD Data types to Visual FoxPro. Visual FoxPro handles XSD Data types in XMLTOCURSOR( ) according to the following table:
| XSD Data Type |
Visual FoxPro Data Type |
| xsd:string |
character |
| xsd:int |
integer |
| xsd:decimal |
number |
| xsd:date |
date |
| xsd:dateTime |
datetime |
| xsd:boolean |
logical |
| xsd:double |
double |
| xsd:binaryBase64 |
memo (binary) |
| xsd:string (>254 characters in length) |
memo |
- Additional nFlag value in XMLTOCURSOR( ) function for XSD schema. The nFlag element in an XMLTOCURSOR( ) statement specifies the handling of XMLSource eExpression. Add the following information to the values in Help:
| nFlag |
Bit |
Description |
| 2048 |
100000000000 |
Used when the imported schema has an XSD schema containing decimal data type with the restrictions (facets) that totalDigits="19" and fractionDigits="4".
XSD data type values will be mapped to the Visual FoxPro currency data type in the resultant cursor. |
| 4096 |
1000000000000 |
Disables base64 decoding.
Base64 encoding in Visual FoxPro is intended to encode only binary data. |
- CURSORTOXML( ), XMLTOCURSOR( ), and XML Schema issues. Interpretation of XSD schema is dependent on decisions to be made after the release date of this version of Visual FoxPro.
- CURSORTOXML( ) In Visual FoxPro 7.0, the CURSORTOXML( ) function implements XSD Schema based on the W3C Recommendation, 04 April 2001. The implementation of this recommendation has not been implemented fully in Visual FoxPro, therefore schema produced by the CURSORTOXML( ) function might not completely reflect changes to the W3C Recommendation or to the Microsoft implementation that occurred after the release of Visual FoxPro 7.0.
- CUSORTOXML( ) You can export "EMPTY" data using CURSORTOXML( ). However, because "EMPTY" is an invalid attribute for non-character types in XSD schema, XML schema validation might fail for "EMPTY" Numeric, Float, Date, and DateTime Visual FoxPro data types. This is only an issue if a schema is required and the resulting XML will be validated against an XML parser that understands XSD schemas.
To work around this situation, you might need to do one of the following:
1. Change the data to a non-empty representation by issuing an appropriate SELECT statement and then using CURSORTOXML( ) against the cursor created. For example:
SELECT ikey, ;
IIF(EMPTY(nc00),0,nc00) as nc00, ;
IIF(EMPTY(alltypesxm.tc11),{^1899-12-30 00:00:00},tc11) as tc11 ;
FROM alltypesxm WHERE ikey<=3 INTO CURSOR atxm
2. Modify the schema. Add the following attribute, xsi:nillable="true", to the relevant element in the schema. For example:
<xsd:element name="tc11" type="xsd:dateTime" nillable="true"/>
3. Next, modify the XML by adding the following attribute, xsi:nil="true", to the relevant element in the XML. For example:
<tc11 xsi:nil="true"/>
Note The nil mechanism applies only to element values, and not to attribute values. An element with xsi:nil="true" might not have any element content, but it might still carry attributes. Also, nil is not used for representing NULL. NULL is represented by the missing element.
- XMLTOCURSOR( ) Accurate interpretation of XSD Schema by the XMLTOCURSOR( ) function is dependent on the next version of the Microsoft XML Parser, MSXML 4.0. Because this version only has been released as a Technology Preview, Visual FoxPro 7.0 uses the current, shipping version, MSXML 3.0. Therefore, XML code that contains references to XSD-based schema might not be imported correctly into Visual FoxPro cursors. In particular, schema that restrict data types to xsd:decimal, xsd:float, and xsd:double might not be imported correctly. In these cases, it might be better to import XML without referencing a schema. In some cases, you also might need to alter the structure of the table after the import is complete to represent the imported datatypes as desired.
Note The XSD Schemas produced by Visual FoxPro CURSORTOXML( ) function should be interpreted correctly.
- Additional nFlag value in CURSORTOXML( ) function for XML schema. The nFlag element in a CURSORTOXML( ) statement specifies the type of XML schema that is produced. Add the following information to the values in Help:
| nFlag |
Bit |
Description |
| 4096 |
1000000000000 |
Disables base64 encoding.
The CURSORTOXML( ) function exports memo (Binary) fields as xsd:base64Binary unless you use nFlag = 4096. Base64 encoding in Visual FoxPro is intended to encode only binary data. |
- XMLTOCURSOR( ) columns limit. The XMLTOCURSOR( ) function will generate a syntax error on record lengths greater than approximately 160 columns. The exact number of columns that causes an error depends on the length of the column names.
- XMLTOCURSOR( ) pads return value. The XMLTOCURSOR( ) function, when used with an nFlag value representing nocptrans (1024), returns a string padded with trailing spaces equal to the actual string. In other words, the returned string is twice as long.
- CURSORTOXML( ) XML formatting. When you use the CURSORTOXML( ) function to export a table or cursor to XML, the root node is always called "VFPData," regardless of the output format.
- Double data type in CURSORTOXML( ) function. The resultant XML of the CURSORTOXML( ) function will contain the same scale as the exported table if the exported table contains double data type values. For example, if the double column was created with a scale of 6 (CREATE TABLE test (col1 b(6))), the resultant XML will contain six digits to the right of the decimal point.
- XMLUPDATEGRAM( ) ignores SET FIELDS statements. The XMLUPDATEGRAM( ) function, unlike CURSORTOXML( ), ignores any SET FIELDS statement and reads directly from the underlying cursor. If you want to change the table structure before calling XMLUPDATEGRAM( ), you must copy the data into a new cursor. For example, to change a numeric field to a currency field, you could use the following SELECT-SQL statement to create a new cursor then use that cursor for your XMLUPDATEGRAM( ). The following code is provided to show context:
SELECT OrderID, CustID, NTOM(Total_Price) as Total_Price ;
FROM Orders INTO CURSOR New_Orders READWRITE && Make Total_Price a currency field.
CURSORSETPROP("Buffering", 5, "New_Orders") && Enable buffering
REPLACE Total_Price WITH (Total_Price * 1.083) && Add sales tax
cXMLUpdg = XMLUpdategram("New_Orders") && Create updategram
- XMLTOCURSOR( ) processes data differently from variable or string than from file. When converting XML to a cursor, the way the XML is passed to the function influences how DBCS characters in the XML are handled. The DBCS characters are interpreted correctly if you use a file for XMLSource. Using a memory variable or string as the XMLSource, however, results in DBCS information being interpreted incorrectly. You can force the memory variable or string to DBCS using
STRCONV(<string>,11).
CLEAR
CLOSE DATABASES ALL
USE HOME()+'samples\data\customer'
CURSORTOXML('customer','lcXML',1,48,5,"","","")
* this function will result in some incorrect characters being placed in the cursor resultant
XMLTOCURSOR(lcXML,"curCustomerList",4)
* Add the STRCONV() function to allow DBCS data to be converted correctly
XMLTOCURSOR(STRCONV(lcXML,11),"curCustomerList",4)
BROWSE
RETURN
- CTOT() function XML support The appropriate SET DATE setting is necessary to properly interpret datetime strings, whether or not in XML type format. SET DATE YMD is necessary with dates in the Access 2000 or SQL Server 2000 formats listed in the CTOT() Function online help topic.
SET DATE YMD
? CTOT("2000-10-24T13:30:00")
- XMLUpdateGram( ) and issues with Memo and General field data By default, when XMLUpdateGram( ) function is run on a table with a Memo or General field, that data is not included in the updategram. By setting the KeyFieldList property of the cursor, you can force the updategram to include that data. However, that alone will not allow the updategram to be successfully written to SQL Server.
The SQL XML UpdateGram specification dictates that "No values can be specified in the <before> or <after> blocks for SQL table columns of text, ntext, image, binary, and varbinary data types. Any attempt to specify values for these columns in the <before> or <after> blocks generates miscellaneous implicit conversion errors from SQL Server. The only way to avoid this is to declare an explicit schema in which these column mappings are marked with the attribute sql:datatype="text|ntext|image|binary"
The default schema implementation is used for updategrams created in Visual FoxPro 7, which does not support text, image, image or binary data. You could create an explicit schema, which would need to be deployed in the SQL XML IIS vroot. You would also have to modify the updategram Visual FoxPro generates to point to that schema. For more information about annotated schema and SQL Updategrams, see the XML for SQL Server 2000 Web Release 1 (WR1) at http://msdn.microsoft.com/msdn-files/027/001/554/Search.asp.
To get the updategram to include memo data, set the KeyFieldList property.
Set Multilocks On
Create Cursor Test (mField M, cField C(10))
Append Blank
CursorSetProp("Buffering",5)
CursorSetProp("keyfieldlist",'cfield')
mValue = REPLICATE('x ',500)
Replace mField with mValue, cField with "Test"
? XMLUpdategram()
RETURN
You must use an explicit schema on the SQL Server and reference the schema in the updategram to allow the memo data in the updategram to be written to SQL Server.
2.4. OLE DB Provider Issues
- Local Parameterized Views are not supported. Access to Visual FoxPro parameterized views is not supported and will generate an error.
- CREATE TABLE in the Visual FoxPro OLE DB Provider. Tables created with the CREATE TABLE command in the Visual FoxPro OLE DB Provider are placed in the default folder of the calling application, unless you specify another location.
- Supported functions in Visual FoxPro OLE DB Provider. In addition to the commands and functions listed in the "Supported Visual FoxPro Commands and Functions" topic in the online Help, the OLE DB Provider also supports the ADDBS( ), FORCEEXT( ), FORCEPATH( ), JUSTDRIVE( ), JUSTEXT( ), JUSTNAME( ), JUSTPATH( ), JUSTTEM( ), and PCOUNT( ) functions.
- Syntax of Stored Procedure Calls in Visual FoxPro OLE DB Provider. When calling a stored procedure using the Visual FoxPro OLE DB Provider, set CommandType to adCmdText (1) or to adCmdUnknown (8), and not to adStoredProc (4). Visual FoxPro requires that stored procedures have open and close parentheses "()" at the end of the stored procedure name. However, ADO removes the parentheses from the end of the stored procedure name when you use adStoreProc.
- OLE DB Provider Data Support changes. Support for numeric and float data types as described in the Help documentation has changed to the following:
| Data type |
Indicator |
Size |
Range |
OLE DB type |
| Numeric |
N |
1 to 20 bytes |
- .9999999999E+19 to .9999999999E+20 |
DBTYPE_DECIMAL |
| Float |
F |
1 to 20 bytes |
- .9999999999E+19 to .9999999999E+20 |
DBTYPE_DECIMAL |
2.5. InstallShield Express Issues
- InstallShield version conflict. If you already own a Full edition of InstallShield Express and would like to install the special Visual FoxPro edition, consider the following:
The Visual FoxPro and the Full editions of the InstallShield Express (Express) product are considered two versions of the same product and therefore cannot coexist. If you install one version of Express on a machine where another already exists, the original version is uninstalled automatically.
The Visual FoxPro edition does not contain all of the features of the Full edition, so you should retain the Full edition on your machine. The Visual FoxPro edition does have built-in detection support to locate redistributable merge modules installed by the Visual FoxPro Setup. This functionality is not in the current Full edition of InstallShield Express 3, but you can add this functionality by adding a Registry key setting as follows:
To add Visual FoxPro merge module support to InstallShield Express 3.0
- From the Start menu, click Run.
- In the Run dialog box, type regedit, and click OK.
- In the Registry Editor, locate the following registry key:
HKEY_CURRENT_USER\Software\InstallShield\Express\3.0\Project Settings
- Double-click the MMSearchPath key, and change the value to include the Visual FoxPro redistributable merge module location. If there are existing paths for this setting, you must separate them from the new location with a comma (","). The Visual FoxPro merge modules typically are installed in the following location:
C:\Program Files\Common Files\Microsoft Shared\Merge Modules
Note If InstallShield Express is running already, you must quit and restart for the merge modules to appear in the InstallShield IDE.
- File names of InstallShield merge modules indicate language. When you add specific Visual FoxPro language resource runtime merge modules in InstallShield, the different merge modules each will appear as "Visual FoxPro 7 Runtime Resource Library." You can determine which language is contained in each merge module by checking the actual name of the module according to the following table:
| File name |
Language |
| vfp7rchs.msm |
Simplified Chinese |
| vfp7rcht.msm |
Traditional Chinese |
| vfp7rcsy.msm |
Czech |
| vfp7rdeu.msm |
German |
| vfp7resn.msm |
Spanish |
| vfp7rfra.msm |
French |
| vfp7rkor.msm |
Korean |
| vfp7rrus.msm |
Russian |
- InstallShield error message suppression. When you perform a custom setup using InstallShield, you might see the following message:
1207: Windows (R) Installer 1.11.2405.0 found. This is an older version of the Windows (R) Installer. Click OK to continue.
You can suppress this message by changing the "Suppress Launcher Warning" property in the Build view to "Yes."
- Install ODBC drivers with MDAC. You should not install individual ODBC drivers using Step 3: Configure the Target System, ODBC Resources node in InstallShield Express. You can install DSNs using the check boxes in the ODBC Resources pane, but the ODBC drivers themselves should be installed with MDAC, by including the appropriate MDAC merge module in your distribution. Do this by navigating to Step 2: Specify Application Data and selecting the Objects/Merge Modules node. Then, you can select the check box for the appropriate MDAC version merge module in the InstallShield Objects/Merge Modules pane. Select MDAC25 to install MDAC version 2.5, or MDAC26ENU to install MDAC 2.6.
If you include an MDAC merge module, it will be installed when you start the installation setup program or run the .msi file. After MDAC installs, you will be prompted to install your application.
3. Additional Information
3.1. Using the VFPCLEAN.APP Utility
Visual FoxPro ships with a new utility called VFPCLEAN.APP, which is located in the HOME( ) directory. This utility repairs common problems associated with having installed earlier (Beta) versions of Visual FoxPro 7.0 on the machine. These problems include invalid registry keys and outdated core product files. The outcome of running this file is intended to restore the state of Visual FoxPro to that of a clean installation.
The VFPCLEAN tool can be run in two different modes:
- Silent Typically, this mode is used for machines that had a previous (Beta) version of Visual FoxPro 7.0, because it resets registry keys and other core files to their first-time use default settings.
- Interactive This mode offers dialog box prompts if potential issues are encountered. For example, if the default file name for _GENMENU is not found and instead points to GENMENUX.PRG, then you would be prompted to overwrite with the default value. Under Silent mode, this registry key would be reset to the default value automatically.
The following functions are performed by VFPCLEAN.APP:
- Fox registry settings Checks for valid Options dialog box File Location settings, such as _BROWSER, _SAMPLES and _WIZARD. If a non-existent file setting is detected, such as one from a prior version that was just uninstalled, then that registry key is reset to the default setting. Under Silent mode, the keys always are reset to their default values. With Interactive mode, you are prompted about how to handle the issue.
- FoxCode table Checks the Foxcode.dbf table used for IntelliSense. If an older invalid version is detected, then a backup copy is made, and the old one is replaced with a clean new copy. The default Foxcode.dbf table is stored in the HOME( ) directory, but the copy used by Visual FoxPro is reference by the _FOXCODE system variable.
Note The IntelliSense Manager also will perform version validation when it runs.
- Foxtask table Checks the Foxtask.dbf table used by the Task Manager. If an invalid file reference is detected, VFPCLEAN resets the registry key (_FOXTASK).
- Foxrefs table Deletes the Foxrefs.dbf table if run under Silent mode. This table is created automatically by the InstelliSense Manager Type Library References dialog box or the Object Browser and stores a list of COM servers and ActiveX controls available on your machine.
- Foxws table Checks the Web Services file (Foxws.dbf) used by IntelliSense and the Web Services wizard. This file is created in the same location as _FOXCODE. If an invalid version is detected, then a backup copy is made, and a new valid version is created.
- CHM file extensions Restores any HTML Help (.chm) file extension associations removed while uninstalling a prior Visual FoxPro beta. VFPCLEAN will check and repair registry keys if they were found broken.
To run VFPCLEAN.APP
- In the Command Window, type DO HOME()+"VFPCLEAN.APP".
Note Source code for VFPCLEAN.APP is included in Tools\Xsource\Xsource.zip.
3.2. Using Add-ins in the Object Browser
The Object Browser Add-In Setup wizard has additional features that are not currently documented. You can access these options from the "Click here for Advanced Options" link on the last page of the wizard.
Properties
Object Browser add-ins are represented by objects. If you are using a common add-in class for multiple add-ins, you might want to reuse certain custom properties, but with different settings. This option allows you to create your own add-in classes that contain custom properties. Additionally, it is also useful with 3rd party add-ins which might not have source code included.
For example, imagine the following add-in class with several custom properties:
DEFINE CLASS SomeAddIn AS AddIn
SomeProperty = .F.
SomeOtherProperty = "Test"
** More code to be provided here...
ENDDEFINE
Through the Properties field of the Add-in wizard, you can easily override these properties so that they cause the add-in to behave a little differently.
SomeProperty = .T.
SomeOtherProperty = "Something Else"
User Defined Settings
The User Defined Settings field is tied directly to the User field in your Objectbrowser.dbf table. The Object Browser itself does not explicitly use this field, however, you can use this field for an add-in or other customization to store or retrieve information not natively stored by the Object Browser.
3.3. Getting Started Articles on the CD
The Visual FoxPro CD contains, in the \Technical Articles folder, several papers about accessing and creating data and applications with Visual FoxPro tools for first-time or occasional users. For a list of papers, see articles.htm in the \Technical Articles folder. In addition, there is a paper about deployment (VFPDeploy.doc), which contains valuable information regarding file dependencies needed for distributing custom applications with InstallShield and other Windows Installer-based deployment products.