AdoServer:Source

<< Click to Display Table of Contents >>

Navigation:  Dataservers > AdoServer Class > Properties >

AdoServer:Source

Previous pageReturn to chapter overviewNext page

Purpose

Return the underlying source of the Server

 

Prototype

 

PROPERTY Source AS USUAL

 

Data Type

 

 

Argument(s)

uSource        New source. May be one of:

 - String

 - AdoCommand Object

 - AdoStream Object

 

When a new source is assigned, the server will send a NOTIFYINTENTTOMOVE before the operation and a NOTIFYFILECHANGE after the operation.

Note

Assigning a new source 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

 

Note 2

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