Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

locking in direct SQL commands and DW

6 posts in General Discussion (old) Last posting was on 2000-02-23 10:23:51.0Z
Panos Panagos Posted on 2000-02-21 16:42:25.0Z
Newsgroups: sybase.public.easerver
Date: Mon, 21 Feb 2000 17:42:25 +0100
From: Panos Panagos <p.panagos@intrasoft.be>
Organization: Intrasoft International
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en,fr-BE
MIME-Version: 1.0
Subject: locking in direct SQL commands and DW
Content-Type: multipart/mixed; boundary="------------56854C1753B0FB9D0BDACF7A"
Lines: 47
NNTP-Posting-Host: 195.61.131.13
Message-ID: <347_38B16AF1.3146B4C4@intrasoft.be>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28281
Article PK: 160321

I haven't been experienced with locks.

I have 2 scenarios:
1. We are using Jaguar 3.0 and HTML DW developed by PowerBuilder 7.0 for
a web-based application. The user updates a DW (a DW which allowing
updates, Key and updatable Columns) and another user is able to open the
same DW and update the same dat. How i can prevent the second user from
opening the DW or how i can lock his attempt to change the data which at
the same time are changed by the first user?

2. In PowerDynamo we are using embedded SQL select commands to show
some data form the database in an HTML form. The user may change the
data and clicking on a button Update, he performs an UPDATE query. A
second user may select the data with the embedded SQL command and change
them concurrently. Depending of who of the 2 users will press the button
update last (perform the UPDATE command last) only his changes will be
stored in the database. How i can prevent the second user from Selecting
the data when those data are changing by the first user in the HTML
form?


Now my database seems to be "single user" .


Any help is appreciated !!!!

Panagos Panos


Download VCard p.panagos.vcf


Larry Cermak[Team Sybase] Posted on 2000-02-22 05:06:30.0Z
Newsgroups: sybase.public.easerver
From: "Larry Cermak[Team Sybase]" <lcermak@ctpartners.com>
Subject: Re: locking in direct SQL commands and DW
Date: Mon, 21 Feb 2000 23:06:30 -0600
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: node49.dhcpchi.dslspeed.zyan.com 208.41.199.49
Message-ID: <347_W20PlOPf$GA.65@forums.sybase.com>
References: <347_38B16AF1.3146B4C4@intrasoft.be>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28231
Article PK: 160110

I believe your best approach is to customize the HTMLGenerator component to
build your own locking mechanism. This could be done via the database, or
via a stateful component in Jaguar. You could also possibly do this with
the HTMLGenerator component and service classes.

--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)

"Panos Panagos" <p.panagos@intrasoft.be> wrote in message
news:38B16AF1.3146B4C4@intrasoft.be...
> I haven't been experienced with locks.
>
> I have 2 scenarios:
> 1. We are using Jaguar 3.0 and HTML DW developed by PowerBuilder 7.0 for
> a web-based application. The user updates a DW (a DW which allowing
> updates, Key and updatable Columns) and another user is able to open the
> same DW and update the same dat. How i can prevent the second user from
> opening the DW or how i can lock his attempt to change the data which at
> the same time are changed by the first user?
>
> 2. In PowerDynamo we are using embedded SQL select commands to show
> some data form the database in an HTML form. The user may change the
> data and clicking on a button Update, he performs an UPDATE query. A
> second user may select the data with the embedded SQL command and change
> them concurrently. Depending of who of the 2 users will press the button
> update last (perform the UPDATE command last) only his changes will be
> stored in the database. How i can prevent the second user from Selecting
> the data when those data are changing by the first user in the HTML
> form?
>
>
> Now my database seems to be "single user" .
>
>
> Any help is appreciated !!!!
>
> Panagos Panos
>
>
>


Panos Panagos Posted on 2000-02-22 08:37:08.0Z
Newsgroups: sybase.public.easerver
Date: Tue, 22 Feb 2000 09:37:08 +0100
From: Panos Panagos <p.panagos@intrasoft.be>
Organization: Intrasoft International
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en,fr-BE
MIME-Version: 1.0
Subject: Re: locking in direct SQL commands and DW
Content-Type: multipart/mixed; boundary="------------F43A828B3BEBD369ECE06BDA"
Lines: 67
NNTP-Posting-Host: 195.61.131.13
Message-ID: <347_38B24AB4.AD2CE5BE@intrasoft.be>
References: <347_38B16AF1.3146B4C4@intrasoft.be> <347_W20PlOPf$GA.65@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28227
Article PK: 160103

Thanks a lot Larry,

How i can implement the locking mechanism via database?

"Larry Cermak[Team Sybase]" wrote:

> I believe your best approach is to customize the HTMLGenerator component to
> build your own locking mechanism. This could be done via the database, or
> via a stateful component in Jaguar. You could also possibly do this with
> the HTMLGenerator component and service classes.
>
> --
>
> Larry Cermak [Team Sybase]
> Corporate Technology Partners, Inc.
> www.ctpartners.com
> Web DataWindow Articles
> (http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
>
> "Panos Panagos" <p.panagos@intrasoft.be> wrote in message
> news:38B16AF1.3146B4C4@intrasoft.be...
> > I haven't been experienced with locks.
> >
> > I have 2 scenarios:
> > 1. We are using Jaguar 3.0 and HTML DW developed by PowerBuilder 7.0 for
> > a web-based application. The user updates a DW (a DW which allowing
> > updates, Key and updatable Columns) and another user is able to open the
> > same DW and update the same dat. How i can prevent the second user from
> > opening the DW or how i can lock his attempt to change the data which at
> > the same time are changed by the first user?
> >
> > 2. In PowerDynamo we are using embedded SQL select commands to show
> > some data form the database in an HTML form. The user may change the
> > data and clicking on a button Update, he performs an UPDATE query. A
> > second user may select the data with the embedded SQL command and change
> > them concurrently. Depending of who of the 2 users will press the button
> > update last (perform the UPDATE command last) only his changes will be
> > stored in the database. How i can prevent the second user from Selecting
> > the data when those data are changing by the first user in the HTML
> > form?
> >
> >
> > Now my database seems to be "single user" .
> >
> >
> > Any help is appreciated !!!!
> >
> > Panagos Panos
> >
> >
> >


Download VCard p.panagos.vcf


Larry Cermak[Team Sybase] Posted on 2000-02-23 04:07:00.0Z
Newsgroups: sybase.public.easerver
From: "Larry Cermak[Team Sybase]" <lcermak@ctpartners.com>
Subject: Re: locking in direct SQL commands and DW
Date: Tue, 22 Feb 2000 22:07:00 -0600
Lines: 83
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: node49.dhcpchi.dslspeed.zyan.com 208.41.199.49
Message-ID: <347_wlbaESbf$GA.251@forums.sybase.com>
References: <347_38B16AF1.3146B4C4@intrasoft.be> <347_W20PlOPf$GA.65@forums.sybase.com> <347_38B24AB4.AD2CE5BE@intrasoft.be>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28109
Article PK: 159997

I would create a stateful component that the key is a character field that
you can use script to concatenate the primary key fields together. Then
before each record is selected, check the stateful component and see if
someone else has it locked. Then as each record is read, insert a record
into the component indicating a lock. Remember that as each page is done to
delete the "lock" record. Basically the same locking that people have been
doing for years in client/server apps in a stateful component.

--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)

"Panos Panagos" <p.panagos@intrasoft.be> wrote in message
news:38B24AB4.AD2CE5BE@intrasoft.be...
> Thanks a lot Larry,
>
> How i can implement the locking mechanism via database?
>
>
> "Larry Cermak[Team Sybase]" wrote:
>
> > I believe your best approach is to customize the HTMLGenerator component
to
> > build your own locking mechanism. This could be done via the database,
or
> > via a stateful component in Jaguar. You could also possibly do this
with
> > the HTMLGenerator component and service classes.
> >
> > --
> >
> > Larry Cermak [Team Sybase]
> > Corporate Technology Partners, Inc.
> > www.ctpartners.com
> > Web DataWindow Articles
> > (http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
> >
> > "Panos Panagos" <p.panagos@intrasoft.be> wrote in message
> > news:38B16AF1.3146B4C4@intrasoft.be...
> > > I haven't been experienced with locks.
> > >
> > > I have 2 scenarios:
> > > 1. We are using Jaguar 3.0 and HTML DW developed by PowerBuilder 7.0
for
> > > a web-based application. The user updates a DW (a DW which allowing
> > > updates, Key and updatable Columns) and another user is able to open
the
> > > same DW and update the same dat. How i can prevent the second user
from
> > > opening the DW or how i can lock his attempt to change the data which
at
> > > the same time are changed by the first user?
> > >
> > > 2. In PowerDynamo we are using embedded SQL select commands to show
> > > some data form the database in an HTML form. The user may change the
> > > data and clicking on a button Update, he performs an UPDATE query. A
> > > second user may select the data with the embedded SQL command and
change
> > > them concurrently. Depending of who of the 2 users will press the
button
> > > update last (perform the UPDATE command last) only his changes will be
> > > stored in the database. How i can prevent the second user from
Selecting
> > > the data when those data are changing by the first user in the HTML
> > > form?
> > >
> > >
> > > Now my database seems to be "single user" .
> > >
> > >
> > > Any help is appreciated !!!!
> > >
> > > Panagos Panos
> > >
> > >
> > >
>


Dave Wolf [Sybase] Posted on 2000-02-23 04:13:02.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: locking in direct SQL commands and DW
Date: Tue, 22 Feb 2000 23:13:02 -0500
Lines: 98
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: 158.159.8.10
Message-ID: <347_hmLcPTbf$GA.251@forums.sybase.com>
References: <347_38B16AF1.3146B4C4@intrasoft.be> <347_W20PlOPf$GA.65@forums.sybase.com> <347_38B24AB4.AD2CE5BE@intrasoft.be> <347_wlbaESbf$GA.251@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28108
Article PK: 159995

Why not use a timestamp and a stateless instance?

Dave Wolf
Internet Applications Division

"Larry Cermak[Team Sybase]" <lcermak@ctpartners.com> wrote in message
news:wlbaESbf$GA.251@forums.sybase.com...
> I would create a stateful component that the key is a character field that
> you can use script to concatenate the primary key fields together. Then
> before each record is selected, check the stateful component and see if
> someone else has it locked. Then as each record is read, insert a record
> into the component indicating a lock. Remember that as each page is done
to
> delete the "lock" record. Basically the same locking that people have
been
> doing for years in client/server apps in a stateful component.
>
> --
>
> Larry Cermak [Team Sybase]
> Corporate Technology Partners, Inc.
> www.ctpartners.com
> Web DataWindow Articles
> (http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
>
> "Panos Panagos" <p.panagos@intrasoft.be> wrote in message
> news:38B24AB4.AD2CE5BE@intrasoft.be...
> > Thanks a lot Larry,
> >
> > How i can implement the locking mechanism via database?
> >
> >
> > "Larry Cermak[Team Sybase]" wrote:
> >
> > > I believe your best approach is to customize the HTMLGenerator
component
> to
> > > build your own locking mechanism. This could be done via the
database,
> or
> > > via a stateful component in Jaguar. You could also possibly do this
> with
> > > the HTMLGenerator component and service classes.
> > >
> > > --
> > >
> > > Larry Cermak [Team Sybase]
> > > Corporate Technology Partners, Inc.
> > > www.ctpartners.com
> > > Web DataWindow Articles
> > > (http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
> > >
> > > "Panos Panagos" <p.panagos@intrasoft.be> wrote in message
> > > news:38B16AF1.3146B4C4@intrasoft.be...
> > > > I haven't been experienced with locks.
> > > >
> > > > I have 2 scenarios:
> > > > 1. We are using Jaguar 3.0 and HTML DW developed by PowerBuilder 7.0
> for
> > > > a web-based application. The user updates a DW (a DW which allowing
> > > > updates, Key and updatable Columns) and another user is able to open
> the
> > > > same DW and update the same dat. How i can prevent the second user
> from
> > > > opening the DW or how i can lock his attempt to change the data
which
> at
> > > > the same time are changed by the first user?
> > > >
> > > > 2. In PowerDynamo we are using embedded SQL select commands to show
> > > > some data form the database in an HTML form. The user may change the
> > > > data and clicking on a button Update, he performs an UPDATE query. A
> > > > second user may select the data with the embedded SQL command and
> change
> > > > them concurrently. Depending of who of the 2 users will press the
> button
> > > > update last (perform the UPDATE command last) only his changes will
be
> > > > stored in the database. How i can prevent the second user from
> Selecting
> > > > the data when those data are changing by the first user in the HTML
> > > > form?
> > > >
> > > >
> > > > Now my database seems to be "single user" .
> > > >
> > > >
> > > > Any help is appreciated !!!!
> > > >
> > > > Panagos Panos
> > > >
> > > >
> > > >
> >
>
>


Hung Posted on 2000-02-23 10:23:51.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 23 Feb 2000 11:23:51 +0100
From: Hung <hungdao@kuleuven.cs.ac.be>
Reply-To: dao@intrasoft.be
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: locking in direct SQL commands and DW
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 101
NNTP-Posting-Host: 195.61.131.13
Message-ID: <347_38B3B537.BEEBF7FB@kuleuven.cs.ac.be>
References: <347_38B16AF1.3146B4C4@intrasoft.be> <347_W20PlOPf$GA.65@forums.sybase.com> <347_38B24AB4.AD2CE5BE@intrasoft.be> <347_wlbaESbf$GA.251@forums.sybase.com> <347_hmLcPTbf$GA.251@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28096
Article PK: 159988

I think that to use a timestamp and a stateless instance might be more efficient
in controlling lock
in some cases.Like in my distributed, to create a stateful component that will
be not flexible
application i often used stateless instance and lock was done via the database
side.
For HTML, to customize the HTMLGenerator component to build my own locking
mechanism
will bet better, but I am afraid of that there will be side affect to the whole
my previous application
to use the new customized HTMLGenerator.

Hung

"Dave Wolf [Sybase]" wrote:

> Why not use a timestamp and a stateless instance?
>
> Dave Wolf
> Internet Applications Division
>
> "Larry Cermak[Team Sybase]" <lcermak@ctpartners.com> wrote in message
> news:wlbaESbf$GA.251@forums.sybase.com...
> > I would create a stateful component that the key is a character field that
> > you can use script to concatenate the primary key fields together. Then
> > before each record is selected, check the stateful component and see if
> > someone else has it locked. Then as each record is read, insert a record
> > into the component indicating a lock. Remember that as each page is done
> to
> > delete the "lock" record. Basically the same locking that people have
> been
> > doing for years in client/server apps in a stateful component.
> >
> > --
> >
> > Larry Cermak [Team Sybase]
> > Corporate Technology Partners, Inc.
> > www.ctpartners.com
> > Web DataWindow Articles
> > (http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
> >
> > "Panos Panagos" <p.panagos@intrasoft.be> wrote in message
> > news:38B24AB4.AD2CE5BE@intrasoft.be...
> > > Thanks a lot Larry,
> > >
> > > How i can implement the locking mechanism via database?
> > >
> > >
> > > "Larry Cermak[Team Sybase]" wrote:
> > >
> > > > I believe your best approach is to customize the HTMLGenerator
> component
> > to
> > > > build your own locking mechanism. This could be done via the
> database,
> > or
> > > > via a stateful component in Jaguar. You could also possibly do this
> > with
> > > > the HTMLGenerator component and service classes.
> > > >
> > > > --
> > > >
> > > > Larry Cermak [Team Sybase]
> > > > Corporate Technology Partners, Inc.
> > > > www.ctpartners.com
> > > > Web DataWindow Articles
> > > > (http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
> > > >
> > > > "Panos Panagos" <p.panagos@intrasoft.be> wrote in message
> > > > news:38B16AF1.3146B4C4@intrasoft.be...
> > > > > I haven't been experienced with locks.
> > > > >
> > > > > I have 2 scenarios:
> > > > > 1. We are using Jaguar 3.0 and HTML DW developed by PowerBuilder 7.0
> > for
> > > > > a web-based application. The user updates a DW (a DW which allowing
> > > > > updates, Key and updatable Columns) and another user is able to open
> > the
> > > > > same DW and update the same dat. How i can prevent the second user
> > from
> > > > > opening the DW or how i can lock his attempt to change the data
> which
> > at
> > > > > the same time are changed by the first user?
> > > > >
> > > > > 2. In PowerDynamo we are using embedded SQL select commands to show
> > > > > some data form the database in an HTML form. The user may change the
> > > > > data and clicking on a button Update, he performs an UPDATE query. A
> > > > > second user may select the data with the embedded SQL command and
> > change
> > > > > them concurrently. Depending of who of the 2 users will press the
> > button
> > > > > update last (perform the UPDATE command last) only his changes will
> be
> > > > > stored in the database. How i can prevent the second user from
> > Selecting
> > > > > the data when those data are changing by the first user in the HTML
> > > > > form?
> > > > >
> > > > >
> > > > > Now my database seems to be "single user" .
> > > > >
> > > > >
> > > > > Any help is appreciated !!!!
> > > > >
> > > > > Panagos Panos
> > > > >
> > > > >
> > > > >
> > >
> >
> >