AdoServer:Source Assign

<< Click to Display Table of Contents >>

Navigation:  Dataservers > AdoServer Class >

AdoServer:Source Assign

Previous pageReturn to chapter overviewNext page

Purpose

 

Prototype

ASSIGN Source ( uSource) CLASS AdoServer

 

Argument(s)

uBookMark        New source. May be one of:

 - String

 - AdoCommand Object

 - AdoStream Object

 

Description

Changes the underlying source of a recordset. Please make sure that you return the same column layout as the original source, or else clients (datawindows, browser) using the server may get confused.

Setting the source will perform the following changes:

The original recordset will be closed

The recordset will be reopened using the new source

The new column layout will be read

The server will be positioned on the first row of the new result set

a Notify(NOTIFYFILECHANGE) will be send to the clients of the server

 

The server will send a NOTIFYINTENTTOMOVE before the operation and a NOTIFYFILECHANGE after the operation.

 

Note

If the new source is invalid the recordset will remain closed and the server becomes 'useless'

 

Example(s)

oSrv := AdoServer{"Select * from Employee order by emp_id", oConn,AdOpenStatic}

? "Original Source", oSrv:Source

// Do something

// Change source using String        

oSrv:Source := "Select * from Employee where emp_id like 'P%' order by emp_id"

? "New Source", oSrv:Source

// Do something else

 

See Also

AdoServer, AdoServer:Source Access