Export (0) Print
Expand All

ADO and Long Data Types (Web)

SQL Server 2000

This sample application demonstrates how to use ADO and VBScript to display long data types on an Active Server Page (ASP) using the Employees table in the Northwind database. The Photo column is an image data type, and the Notes column is an ntext data type.

Default Location

C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\ADO\Web\Employee

Running the Sample
  1. Register the ActiveX control, FileAccessor.dll, using Regsvr32. For example, if you place the file in C:\Test, register it using this syntax:
    regsvr32 c:\test\fileaccessor.dll

  2. In EmployeeSample.asp, set the global variable, TempFileDrive, to an existing directory. This is where the temporary image files are created.

  3. In EmployeeSample.asp, set the global variable, TempFileHttp, to a URL equivalent to TempFileDrive. For example, if TempFileDrive is set to C:\Inetpub\wwwroot\EmployeeSample\, TempFileHttp might be set to http://Myserver/EmployeeSample/.

The Visual Basic code used to create FileAccessor.dll is located at: C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\ADO\Web\Employee\Fileaccessor. If you create FileAccessor.dll using these files, it is registered automatically, and Step 1 in Running the Sample is unnecessary. To create FileAccessor.dll using these files:

Open the Visual Basic project file, FileAccessor.vbp.

On the File menu, click Make FileAccessor.dll.

See Also

ADO Samples

© 2015 Microsoft