Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #1031

Re: ADO

From "Willie Moore" <williem@wmconsulting.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: ADO
Date 2011-05-03 07:56 -0500
Organization Aioe.org NNTP Server
Message-ID <ipou2f$k0a$1@speranza.aioe.org> (permalink)
References <ipedl3$j3i$1@dont-email.me> <4dbb52d2$0$77724$c30e37c6@exi-reader.telstra.net> <iplmgc$f12$1@dont-email.me> <ipm715$41b$1@speranza.aioe.org> <ipm7vc$q6t$1@dont-email.me>

Show all headers | View raw


Eckhard,

What you need todo with the server is take the code  presented in the last 
message and make it method if your SQL class. It should return an 
ADORecordset. so you would execute your asynch method to get the recordset 
asynch and then pas it to your ADOServer.
     oRS := SELF:ExecuteRecordSetAsynch(cSQL,nFlags)
     oServer := ADOServer{oRS}

If you look at the source for ADOServer you will see that it can take a 
string for the source of an ADORecordset. But as soon as it starts to 
process, it needs the completed recordset before it can complete building 
the server. That is why  said that you need to execute your recordset first 
then add it to your server. If you go straight for the server, it will not 
build the recordset asynch.

Geoff does everything asynch in SQLMaster. When I have questions on how to 
do something in ADO, I usually read his source to figure out how he did it 
(if it is a technique that I don’t already know such as asynch).

Regards,
Willie

"Eckhard Sallermann"  wrote in message news:ipm7vc$q6t$1@dont-email.me...

hi Willie,

that´s okay, what i have forgotten is "oRS:CursorLocation :=
adUseClient", thank you so far.


but how to do without a recordset, only using AdoServer ??



Am 02.05.2011 14:11, schrieb Willie Moore:
> Hey,
>
> Here is some code that sets up for asynch operations. I hope that it helps
>
> Regards,
> Willie
>
> BEGIN SEQUENCE
> oRS := AdoRecordSet{}
> oRS:CursorLocation := adUseClient
> oRs:Properties:[Item,"Initial Fetch Size"]:Value := 500
> oRs:Properties:[Item,"Background Fetch Size"]:Value := 500
> oRS:Open(cSource, SELF:oConn, uCursorType, uLockType,
> adCmdText+adASyncFetch)
> DO WHILE _AND(oRs:State, AdStateFetching) != 0
> // wait in this loop until the process is complete
> Sleep(100)
> IF lShowWait
> // handle code to show a message to the user here with progress
> ENDIF
> ApplicationExec(EXECWHILEEVENT)
> IF _lcancel
> BREAK "User aborted the Select"
> ENDIF
> ENDDO
> IF lShowWait
> // tear down any dialog that is showing the user messages about progress
> ENDIF
>
> IF oRS:State = adStateClosed
> oRS := NULL_OBJECT
> ENDIF
> ErrorBlock(cbErr)
>
> RECOVER USING uError
> ErrorBlock(cbErr)
> // handle error message here
> oRS := NULL_OBJECT
> END SEQUENCE
>
> 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

ADO Eckhard Sallermann <eckhard.sallermann@bur-kg.de> - 2011-04-29 15:15 +0200
  Re: ADO "Geoff Schaller" <geoffx@softwarexobjectives.com.au> - 2011-04-30 00:07 +0000
    Re: ADO "Willie Moore" <williem@wmconsulting.com> - 2011-04-29 21:43 -0500
      Re: ADO "Geoff Schaller" <geoffx@softwarexobjectives.com.au> - 2011-05-01 22:22 +0000
        Re: ADO "Willie Moore" <williem@wmconsulting.com> - 2011-05-01 21:47 -0500
    Re: ADO Eckhard Sallermann <eckhard.sallermann@bur-kg.de> - 2011-05-02 09:29 +0200
      Re: ADO Eckhard Sallermann <eckhard.sallermann@bur-kg.de> - 2011-05-02 14:10 +0200
      Re: ADO "Willie Moore" <williem@wmconsulting.com> - 2011-05-02 07:11 -0500
        Re: ADO Eckhard Sallermann <eckhard.sallermann@bur-kg.de> - 2011-05-02 14:27 +0200
          Re: ADO "Willie Moore" <williem@wmconsulting.com> - 2011-05-03 07:56 -0500
      Re: ADO "Geoff Schaller" <geoffx@softwarexobjectives.com.au> - 2011-05-02 21:55 +0000

csiph-web