AdoServer:Source Assign

<< Click to Display Table of Contents >>

Navigation:  Dataservers > AdoServer Class >

AdoServer:Source Assign

Previous pageReturn to chapter overviewNext page




ASSIGN Source ( uSource) CLASS AdoServer



uBookMark        New source. May be one of:

 - String

 - AdoCommand Object

 - AdoStream Object



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.



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



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