The WriteToDB Sample

The WriteToDB component writes specified fields from an OrderForm to a database table.

To build this component, you must first install the OLE DB 1.5 software development kit (SDK). You can download this SDK free from http://www.microsoft.com/data/ado.

After installing the OLE DB SDK, perform the following to configure your development environment.

Set the include paths in the Visual C++ environment must reference the following path: \OLEDBSDK\include.

Set the library paths in the Visual C++ environment must reference the following path: \OLEDBSDK\lib.

To configure include and library paths, click the Options option on the Tools menu in Visual C++, and then, in the Options dialog, click the Directories tab. From this tab, you can add and remove paths from your include file and library settings.

The WriteToDB sample requires the path to the ADO include files in the build environement; otherwise WriteToDB does not build.

In addition, the sample has the following limitations:

  1. The schema of the table should match the number of fields configured and cannot have more than three fields
  2. The sample does not demonstrate the data type conversion, so the data types for the orderform attributes and tables fields must match; otherwise an error is generated.
  3. Error Description is not always present.

© 1997-1998 Microsoft Corporation. All rights reserved.