BO State information?


Author
Message
Yoyo Young
Yoyo Young
StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)
Group: Forum Members
Posts: 8, Visits: 17
Hi,

Can I get following information from BO before save?
1. row status: newmodified, datamodified, notmodified, new
2. column status: newmodified, datamodified, notmodified, new
3. buffer information: delete buffer(store deleted records), original buffer(store first retireve recorders)

Thanks.

Yoyo
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.5K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Yoyo,



Not sure about all of this, but you can get anything available via an ADO.NET Datatable or DataView. Check out the BOs .CurrentDataTable and CurrentView. The CurrentRow is an ADO.NET Datarow object.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yoyo,

Greg is correct.  The BOs use an internal ADO.NET data table which is exposed through the CurrentDataTable, CurrentView, and CurrentRow properties.  If you cycle through the CurrentDataTable it will include any deleted records by default as the CurrentView, by default, will filter the deleted rows.  However you can turn this off as well.  The RowState of each row has the modified, added, etc state.

For Each loRow As DataRow IN MyBO.CurrentDataTable.Rows
    '-- Check the row state
    If loRow.RowState = Modified Then
       '-- Check on modified
    End If
Next

If you just want to check the current row then you could use the CurrentRow property which is the current row of the BO maintained by the CurrentRowIndex property of the BO.

If MyBO.CurrentRow.RowState = Modified THen
   '-- Add your code
End If

Yoyo Young
Yoyo Young
StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)
Group: Forum Members
Posts: 8, Visits: 17
Thanks.

If I use ES as middle tier, is Currentrow of Ado.net still available? I suppose no DB connection in 3-tier implementation.

Yoyo
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yes, the ES can be implemented in just a few lines of code and relates to the DataAccessLayer of the framework.  Your BO interaction and logic will literally be exactly the same regardless of how you are talking to the back end.
Yoyo Young
Yoyo Young
StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)
Group: Forum Members
Posts: 8, Visits: 17
Hi Taylor,

I am a little confused.
Since suppose I use ES as middle tier, there should be no client DB connection stuff like ADO.Net exists. Why it is still available to call?

Thanks.

Yoyo

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Why it is still available to call?

The ES is at the DataAccessLayer level rather than requiring a business object to be passed back and forth.  StrataFrame does have the ability to pass a full BO through remoting or serialization, but this is the most inefficient way that data can be passed due to the nature of serialization and the meta-tags that go along with serialization.  Remoting is not a good solution because it requires a keep-alive environment.  The absolute best and most efficient way to separate your tiers is through the use of our Enterprise Server because it is optimized for use with only our business objects and data access layer.  When you install the ES on a server you will setup the Data Access connections such as a SQL Server connection, Oracle Connection, or whatever other connections your application may require.  Then within the client side application you will setup the application to use an Enterprise Server Data Access Item rather than a SQL Server item, etc.  When you then launch your application and talk to the Data Source, all of the data is then managed between the ES Server and the client through the DAL and is very streamlined and fast.  I recommend looking at the online sample that is installed with StrataFrame...it allows you to connect to our servers here in Texas so you can see the performance.  Also, I recommend looking at the docs and the web to view many of the different sections and articles which explain ES even further.

http://www.strataframe.net/enterpriseserver.aspx 

Yoyo Young
Yoyo Young
StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)
Group: Forum Members
Posts: 8, Visits: 17
Thanks Taylor.
I come a another question. Suppose I have two UPDATE SQL logic in BO before save and use ES. Do the two UPDATE SQL and BO UPDATE in the same DB transaction? If not, it will be a inconsistence problem.

Yoyo
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
If you are referring to transaction support, StrataFrame fully supports transactions and even allows you to start as many different transactions simultaneously as you want.  Also, the Enterprise Server has full transaction support and even supports load balancing and a server farm environment.  Does that answer your question?  If not please let me know.  Thanks.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search