[Contents] [Previous] [Next] [Index]

blob

Assigns BLOb data to a column in a cursor.

Server-side function

Implemented in

LiveWire 1.0

Syntax

blob (path)

Parameters

path
A string representing the name of a file containing BLOb data. This string must be an absolute pathname.

Returns

A blob object.

Description

Use this function with an updatable cursor to insert or update a row containing BLOb data. To insert or update a row using SQL and the execute method, use the syntax supported by your database vendor.

On DB2, blobs are limited to 32 KBytes.

Remember that back slash ("\") is the escape character in JavaScript. For this reason, in NT filenames you must either use 2 backslashes or a forward slash.

Example

The following statements update BLOb data from the specified GIF files in columns PHOTO and OFFICE of the current row of the EMPLOYEE table.

// Create a cursor
cursor = database.cursor("SELECT * FROM customer WHERE
   customer.ID = " + request.customerID
// Position the pointer on the row
cursor.next()
// Assign the blob data
cursor.photo = blob("c:/customer/photos/myphoto.gif")
cursor.office = blob("c:/customer/photos/myoffice.gif")
// And update the row
cursor.updateRow("employee")


[Contents] [Previous] [Next] [Index]

Last Updated: 10/31/97 16:38:00


Copyright © 1997 Netscape Communications Corporation