StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Implementing a scrollable cursor via the...Expand / Collapse
Author
Message
Posted 04/21/2006 6:35:15 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 09/27/2006 3:58:29 PM
Posts: 19, Visits: 149

Hello,

 

I am working with your sample application (CustomerMaintenance.vb), looking at the mechanics of the customer maintenance form.

 

My question is how does one harness the record navigation events in the maintenance toolbar?

 

Psuedocode for problem case (boCustomer1 = boCustomer)

 

1.) User browses (customer maintenance form), returns to main form which fills with top 1000 records

2.) User navigates, gets to end of recordset (boCustomer1), stops.

3.) Arbitrarily, last name of record stopped at is “Erickson”, customer_id = 1000

 

Unless the user browses again and (somehow) enters a PK of 1000 then the user is ‘stuck’ with no real way to get to record # 1001.

 

What I am looking to do is as follows

 

1.)User navigates through datatable (boCustomer1)

2.)If record_num = MAX(record_num) then

a.    BoCustomer1.Save (commit any unsaved changes)

b.    New boCustomer As boCustomer2

c.    boCustomer2.FillbyPrimarykey (500) (previous and next 500)

d.    BoCustomer1.ClearAndFillFromCompleteTable (BoCustomer2, BusinessCloneDataType.ClearAndFillFromCompleteTable)

e.    (Event – reset (enable) navigation buttons)

f.    BoCustomer2.dispose, BoCustomer2 = Nothing

 

Obviously the #’s could be 10, 100, 1000 and so on. I am trying to create a seamless experience without holding the entire 19K+ table in memory, essentially implementing something similar to a scrollable cursor that is not tightly bound.

 

I could use my own record navigation controls to implement this but I/we like the look and feel of the Strataframe maintenance toolstrip.

 

Any thoughts on harnessing the record navigation events in the maintenance toolbar? I’ve been working through the object browser trying to find the right collection to iterate through so I can then access the controls and their events but I am just not getting it.

 

Thoughts/Suggestions on Scrollable Recordsets?

 

Thanks for your time – J

 

Post #887
Posted 04/23/2006 6:38:23 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:50:35 PM
Posts: 4,796, Visits: 4,766
There has been a little confusion on our sample of FillTop100() which I assume is where some of this question began.  We use that sample just to get a small data set from the server to work with when we are showing interaction with our business objects and forms.

If you want to implement the "first 100 / next 100" type of functionality, you will have to code it yourself.  SQL Server does not know what the "next" 100 records would be unless we have a condition of some sort.

The best way to allow an end-user to work with a dynamic data set is through the BrowseDialog.  It allows the users to search for specific records within the entire database and bring just that "narrow" record set back to work on.

If you want to implement a "next 100" type of functionality, then you would need to create a variable within the BO that knows where you are in your search and dynamically create your query.  This would most likely change for each table since the criteria for the "next batch" will most likley change.

There is no reason that you couldn't use the MaintenanceFormToolstrip.  From what I gather in your description, you would want to place your code in the Navigated event of the business object you wish to get the "next 100" records on.  When the navigated event arguments indicate that you are at the end of the table, you could requery the database for the next group.  When this happens, the maintenance form toolstrip will automatically update the buttons for proper interaction.

Private Sub CustomersBO1_Navigated(ByVal e As MicroFour.StrataFrame.Business.NavigatedEventArgs) Handles CustomersBO1.Navigated
      If e.NavigatedPosition = MicroFour.StrataFrame.Business.BusinessNavigatedPosition.Last Then
          '-- Get the next 100 records
      End If
End Sub

Let me know if this helps.

Post #913
Posted 04/24/2006 10:42:08 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 09/27/2006 3:58:29 PM
Posts: 19, Visits: 149
Thank you Trent,

Looks like I was looking to trap the wrong event, the act of navigating versus the object having been navigated. I will give it a try.

Thanks for your time - J

Post #920
Posted 04/24/2006 6:07:58 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:50:35 PM
Posts: 4,796, Visits: 4,766
No problem.  Let me know if you have any other questions.
Post #923
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 7:41am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.125. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.