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.

Transaction Object & disconnected architecture question.

2 posts in DataWindow .NET Last posting was on 2004-09-01 15:25:25.0Z
Jack Addington Posted on 2004-08-31 16:15:32.0Z
From: "Jack Addington" <jaddington@shaw.ca>
Newsgroups: sybase.public.datawindow.net
Subject: Transaction Object & disconnected architecture question.
Lines: 67
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: s010600e018e32f17.cg.shawcable.net
X-Original-NNTP-Posting-Host: s010600e018e32f17.cg.shawcable.net
Message-ID: <4134a424@forums-1-dub>
Date: 31 Aug 2004 09:15:32 -0700
X-Trace: forums-1-dub 1093968932 68.147.193.82 (31 Aug 2004 09:15:32 -0700)
X-Original-Trace: 31 Aug 2004 09:15:32 -0700, s010600e018e32f17.cg.shawcable.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:252
Article PK: 124683

A few questions around how to fit the datawindow.net into my currently
underdevelopment disconnected architecture.

Does the .net transaction object work essentially the same as the PB
transaction? ie) Open the transaction in the app login and then disconnect
at the end of the application?

How is concurrancy handled if I want to stay with a disconnected model? In
all my PB days I never really worried about it and let Oracle/PB return the
"row changed between retrieve and update" message. I just set the update
properties on a datawindow to Update Key and set the PK.

Right now in my .net app I have a data access layer that populates a dataset
and then I push the data/changes around. In addition to the PK I have added
a timestamp column to all my updates where clauses to ensure that no one
else has changed the record. I then pull back the new timestamp on update
and push it back up to the client dataset. Can I simply add the update_ts
column to the datawindow update PKs?

As for keeping with a disconnected architecture would this be the same
suggested methodology for datawindow.net:

businessobject.GetData()
Call DAL.GetData( client.dataobject / client.LibList)

Open transaction in DAL
create datastore
set datastore (dataobject / LibList)
retrieve to datastore
close transaction

return datastore.GetFullState()

SetFullState on client datawindow()
end

businessobject.SaveData()
openTransaction = DAL.GetTrans( )

for each datawindow to save
clientDatawindow.GetFullState( )
call dataobject.SaveData( openTransaction)
create datastore
set datastore (dataobject / LibList)
datastore.SetFullState
datastore.UpdateData(true,false)
return success etc.
next
commit/rollback transaction
DAL.CloseTrans( openTransaction )
datawindows.UpdateFlags(true)
end

Or should I use my datasets and then push the XML data in/out of the
datawindows? Does the datawindow XML contain a status flag for deletes etc?
Or would I need to select from each of the buffers and set the dataset row
status accordingly?

Any help greatly appreciated... I am trying to keep the architecture as
open as possible as I need to be able to support both a windows client and a
web based GUI in short order. I am however very open to suggestions.

thanks

jack


Jim O'Neil [Sybase] Posted on 2004-09-01 15:25:25.0Z
From: "Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com>
Newsgroups: sybase.public.datawindow.net
Subject: Re: Transaction Object & disconnected architecture question.
Message-ID: <9sobj0pjpvl0e1ljpr0uljv4ubqpl33nna@4ax.com>
References: <4134a424@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: joneilw2k.sybase.com
X-Original-Trace: 1 Sep 2004 08:31:58 -0700, joneilw2k.sybase.com
Lines: 107
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 1 Sep 2004 08:14:40 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 1 Sep 2004 08:25:25 -0700
X-Trace: forums-1-dub 1094052325 10.22.108.75 (1 Sep 2004 08:25:25 -0700)
X-Original-Trace: 1 Sep 2004 08:25:25 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:271
Article PK: 124701

I'm not sure there are definitive answers to all these questions here,
but I'll give it a shot. Keep in mind I have a very DataWindow-centric
view of things and not a whole lot of experience in the .NET data
handling paradigms.

On 31 Aug 2004 09:15:32 -0700, "Jack Addington" <jaddington@shaw.ca>

wrote:

>A few questions around how to fit the datawindow.net into my currently
>underdevelopment disconnected architecture.
>
>Does the .net transaction object work essentially the same as the PB
>transaction? ie) Open the transaction in the app login and then disconnect
>at the end of the application?

well, you can use that approach, but nothing about the PB transaction
object ever required it - it's just typically the way C/S developers
did things. The .NET transaction object (AdoTransaction in DataWindow
.NET) is a wrapper around a IDbConnection, if that helps you translate
things.

>How is concurrancy handled if I want to stay with a disconnected model? In
>all my PB days I never really worried about it and let Oracle/PB return the
>"row changed between retrieve and update" message. I just set the update
>properties on a datawindow to Update Key and set the PK.
I think you answered your question below, in the Get/SetFullState
model. The 'state' here is really just a contrivance to serialize a
datastore across application boundaries. Once you do a SetFullState
(or SetChanges) on the 'server' side, you have recreated the datastore
and you can handle things just like you might in a client server
application. You have the same options regarding
optimistic/pessimistic concurrency that you are familiar with in PB
and all that information is stored as part of the GetFullState value.

>
>Right now in my .net app I have a data access layer that populates a dataset
>and then I push the data/changes around. In addition to the PK I have added
>a timestamp column to all my updates where clauses to ensure that no one
>else has changed the record. I then pull back the new timestamp on update
>and push it back up to the client dataset. Can I simply add the update_ts
>column to the datawindow update PKs?
You could, but with the built-in concurrency options of the
datawindow, it really isn't necessary. Using a 'key and updatable'
columns strategy, you'll know whether or not the row was changed since
it was first retrieved - and you'll get the familar "row changed
between retrieve and update" which you can handle how you choose on
the 'update' side of your disconnected model.
>
>As for keeping with a disconnected architecture would this be the same
>suggested methodology for datawindow.net:
>
>businessobject.GetData()
> Call DAL.GetData( client.dataobject / client.LibList)
>
> Open transaction in DAL
> create datastore
> set datastore (dataobject / LibList)
> retrieve to datastore
> close transaction
>
> return datastore.GetFullState()
>
> SetFullState on client datawindow()
>end
>
>businessobject.SaveData()
> openTransaction = DAL.GetTrans( )
>
> for each datawindow to save
> clientDatawindow.GetFullState( )
you'd use GetChanges here instead of GetFullState
> call dataobject.SaveData( openTransaction)
> create datastore
> set datastore (dataobject / LibList)
> datastore.SetFullState
you'd use SetChanges versus SetFullState
> datastore.UpdateData(true,false)
> return success etc.
> next
> commit/rollback transaction
> DAL.CloseTrans( openTransaction )
> datawindows.UpdateFlags(true)
>end
>
>Or should I use my datasets and then push the XML data in/out of the
>datawindows? Does the datawindow XML contain a status flag for deletes etc?
>Or would I need to select from each of the buffers and set the dataset row
>status accordingly?
That's another option, but a bit more work I'd think. You can import
XML into a datawindow, but it would all go into the Primary buffer.
So you would have to do some manipulation of status and/or call
RowsMove to move deleted rows to the Delete buffer.

For what it's worth, DW.NET 2.0 is going to include some tighter
integration with DataSets. The specifics aren't really fleshed out
yet, but it would be my hope that we would support XML back and forth
between DataSets and DataStores without requiring explicit management
of the buffers/status flags.
>
>Any help greatly appreciated... I am trying to keep the architecture as
>open as possible as I need to be able to support both a windows client and a
>web based GUI in short order. I am however very open to suggestions.
>
>thanks
>
>jack
>