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


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

Re: ADS Locking

From Martin <Martin@spam.spam>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: ADS Locking
Date 2017-10-16 10:20 +0100
Organization A noiseless patient Spider
Message-ID <os1tk6$4pp$1@dont-email.me> (permalink)
References <dc28031e-a5bb-472b-99b3-772ccea01a58@googlegroups.com>

Show all headers | View raw


ADS support is now pretty painfull.

As to locking, not had any issues using sql with DBF.

But it may be related to opportunist locking or something of that ilk.



On 16/10/2017 09:34, Frank M wrote:
> Hello,
> 
> i try to change from DBF to ADT Format. And at same time i want to change code to SQL Syntax. So i run into this behavior:
> 
> Server is ADS10.1
> 
> SetAnsi(false)
> SetCollation(#WINDOWS)
> 
> lREt:=AdsConnect60( psz("G:\XXXX\france.add"), ADS_REMOTE_SERVER,psz("XXXX"), psz("XXXX"), ADS_TCP_IP_CONNECTION , @hConnect )
> 
> if lREt=0
>   
> AX_SetConnectionHandle( hConnect )
> 
> 
> //this work:
> oDB:=AdsDBServer{"ffr",true,,"ADSADT"}
>     for I:=1 to oDB:LastRec
>      if ! oDB:EOF
>         oMainWindow:Caption:=oDB:FIELDGET(#test)
>         oDB:FIELDPUT(#test1,"WW")
>         oDB:commit()
>      endif
>      oDB:Skip(1)
>     next
> 
> 
> But when using Sql Syntax, i get "Record has to be locked"
> 
> oServer := AdsSQLServer{"select * from ffr",,,"AXSQLADT"}
>      for I:=1 to oServer:LastRec
> 	if ! oServer:EOF
> 	   oMainWindow:Caption:=oServer:FIELDGET(#test)
> 	   //oServer:RLOCK()    ->>> i have to lock the record.
> 	   oServer:FIELDPUT(#test1,"WW")   //---> error that the Record have to locked.
> 	   oServer:commit()
> 	ENDIF
>          oServer:Skip()
>      next
> 
> 
> 
> endif
> 
> 
> can i change this, that i have not to change all code to use SqlSyntax?
> Or have to use manually locking when working with sql recordsets?
> 
> 
> Regards, Frank
> 
> Is there still ADS Forum?
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

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


Thread

ADS Locking Frank M <frank_muessner@gmx.de> - 2017-10-16 01:34 -0700
  Re: ADS Locking Martin <Martin@spam.spam> - 2017-10-16 10:20 +0100
  Re: ADS Locking Frank M <frank_muessner@gmx.de> - 2017-10-16 03:33 -0700
    Re: ADS Locking D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2017-10-20 17:10 +0200
      Re: ADS Locking Frank M <frank_muessner@gmx.de> - 2017-10-24 00:27 -0700
        Re: ADS Locking D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2017-10-24 12:16 +0200
          Re: ADS Locking Frank M <frank_muessner@gmx.de> - 2017-10-25 23:56 -0700
          Re: ADS Locking Frank M <frank_muessner@gmx.de> - 2017-10-26 03:14 -0700
            Re: ADS Locking D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2017-10-26 16:54 +0200
  Re: ADS Locking Gerhard Bunzel <g.bunzel@domonet.de> - 2017-10-16 12:57 +0200
  Re: ADS Locking Frank M <frank_muessner@gmx.de> - 2017-10-16 05:21 -0700
  Re: ADS Locking "Jamal" <noooospam@example.com> - 2017-10-16 11:24 -0400
  Re: ADS Locking Frank M <frank_muessner@gmx.de> - 2017-10-17 01:39 -0700

csiph-web