msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

synchronize problem

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Enterprise
Author Message
bz



Joined: 04 Oct 2007
Posts: 55

PostPosted: Tue Nov 07, 2006 6:05 am    Post subject: synchronize problem Reply with quote

Hi,

I have a project with one of the specs that says:

1) Save as you type

So everytime you type something, it saves the data right away. (e.g. You
type "123.45 " in a text box. It will save 123.45 right away to the
table.

This is no big deal but the thing is that I can have 4 to 5 forms displayed
at the same time. The forms use the data in the other forms to calculate
the totals.

Let's say I have 4 text boxes, one in each form, this is how it looks:

f() is the function to calculate the total in each form:

Form1.Text1 = "123.45"
Form2.Text1 = f1(Form1.Text1)
Form3.Text1 = f2(Form2.Text1)
Form4.Text1 = f3(Form3.Text1)


So, you can see if I type "123.45" in Form1, you will see the text boxes are
being changed at the same time. And I will have to save the text boxes in
all 4 forms to the database right away.

In reality, the functions take a bunch of parameters on the screen. Each
form has at least 5 to 10 formulas to calculate different totals (or
parameters for the other formula).

It is like writing my own Excel with a bunch of books and bunch of sheets in
each book, and a bunch of formulas linking a bunch of books and sheets. You
can imagine how slow it will run...

Another problem is that not all the forms will be displayed on the screen.
So, if the form is not on the screen, I will have to update the totals
directly in the database using the same formula in that form.

Let's say Form2 or Form3 is not on the screen, I still need to calculate the
totals in these forms in the back, and calculate the totals in Form4... and
save everyting to the database at the same time.



So, would you recommand me any good way to do this project please?




--
http://bzdacat.spaces.live.com/

Archived from group: microsoft>public>vb>enterprise
Back to top
View user's profile Send private message
Ralph



Joined: 04 Oct 2007
Posts: 4148

PostPosted: Tue Nov 07, 2006 12:37 pm    Post subject: Re: synchronize problem Reply with quote

"bz" wrote in message@TK2MSFTNGP04.phx.gbl...
> Hi,
>
> I have a project with one of the specs that says:
>
> 1) Save as you type
>
> So everytime you type something, it saves the data right away. (e.g. You
> type "123.45 " in a text box. It will save 123.45 right away to
the
> table.
>
> This is no big deal but the thing is that I can have 4 to 5 forms
displayed
> at the same time. The forms use the data in the other forms to calculate
> the totals.
>
> Let's say I have 4 text boxes, one in each form, this is how it looks:
>
> f() is the function to calculate the total in each form:
>
> Form1.Text1 = "123.45"
> Form2.Text1 = f1(Form1.Text1)
> Form3.Text1 = f2(Form2.Text1)
> Form4.Text1 = f3(Form3.Text1)
>
>
> So, you can see if I type "123.45" in Form1, you will see the text boxes
are
> being changed at the same time. And I will have to save the text boxes in
> all 4 forms to the database right away.
>
> In reality, the functions take a bunch of parameters on the screen. Each
> form has at least 5 to 10 formulas to calculate different totals (or
> parameters for the other formula).
>
> It is like writing my own Excel with a bunch of books and bunch of sheets
in
> each book, and a bunch of formulas linking a bunch of books and sheets.
You
> can imagine how slow it will run...
>
> Another problem is that not all the forms will be displayed on the screen.
> So, if the form is not on the screen, I will have to update the totals
> directly in the database using the same formula in that form.
>
> Let's say Form2 or Form3 is not on the screen, I still need to calculate
the
> totals in these forms in the back, and calculate the totals in Form4...
and
> save everyting to the database at the same time.
>
> So, would you recommand me any good way to do this project please?
>

The real question is why you need to save these values. If it is in order to
restore some state, then I would just manage the "save typing" as a
completely different process, ie, ignore any other nonsense going on. Then
concentrate on how to restore using the saved values. An entirely separate
process from the actual running of the program.

It is even possible you will find you don't need to save some values as they
can be recreated or possibly not even valid until other values are
completed.

hth
-ralph
Back to top
View user's profile Send private message
bz



Joined: 04 Oct 2007
Posts: 55

PostPosted: Tue Nov 07, 2006 3:54 pm    Post subject: Re: synchronize problem Reply with quote

"Ralph" wrote in message @arkansas.net...
>
> "bz" wrote in message
> @TK2MSFTNGP04.phx.gbl...
>> Hi,
>>
>> I have a project with one of the specs that says:
>>
>> 1) Save as you type
>>
>> So everytime you type something, it saves the data right away. (e.g. You
>> type "123.45 " in a text box. It will save 123.45 right away to
> the
>> table.
>>
>> This is no big deal but the thing is that I can have 4 to 5 forms
> displayed
>> at the same time. The forms use the data in the other forms to calculate
>> the totals.
>>
>> Let's say I have 4 text boxes, one in each form, this is how it looks:
>>
>> f() is the function to calculate the total in each form:
>>
>> Form1.Text1 = "123.45"
>> Form2.Text1 = f1(Form1.Text1)
>> Form3.Text1 = f2(Form2.Text1)
>> Form4.Text1 = f3(Form3.Text1)
>>
>>
>> So, you can see if I type "123.45" in Form1, you will see the text boxes
> are
>> being changed at the same time. And I will have to save the text boxes
>> in
>> all 4 forms to the database right away.
>>
>> In reality, the functions take a bunch of parameters on the screen. Each
>> form has at least 5 to 10 formulas to calculate different totals (or
>> parameters for the other formula).
>>
>> It is like writing my own Excel with a bunch of books and bunch of sheets
> in
>> each book, and a bunch of formulas linking a bunch of books and sheets.
> You
>> can imagine how slow it will run...
>>
>> Another problem is that not all the forms will be displayed on the
>> screen.
>> So, if the form is not on the screen, I will have to update the totals
>> directly in the database using the same formula in that form.
>>
>> Let's say Form2 or Form3 is not on the screen, I still need to calculate
> the
>> totals in these forms in the back, and calculate the totals in Form4...
> and
>> save everyting to the database at the same time.
>>
>> So, would you recommand me any good way to do this project please?
>>
>
> The real question is why you need to save these values. If it is in order
> to
> restore some state, then I would just manage the "save typing" as a
> completely different process, ie, ignore any other nonsense going on. Then
> concentrate on how to restore using the saved values. An entirely separate
> process from the actual running of the program.
>
> It is even possible you will find you don't need to save some values as
> they
> can be recreated or possibly not even valid until other values are
> completed.
>
> hth
> -ralph
>
>

They want to write their own speadsheet program with 5 books and couple
sheets in each book. The requirement is that after you type something, the
speadsheet will recalculate all 5 books with the formulas, and save
everything right away to the database.

And the user is allowed to type their own totals. The speadsheet will then
use the user's inputs to calculate the rest of the totals instead, and save.

for example,

I have a formula C1 = C2 * C3. the user type 10 and 20 in C2 and C3. C1 is
being calculated to be 200. The user is allowed to enter 900 in C1. The
program will then use 900 (instead of 200) to calculate the rest of the
totals.

While the user is typing, the speadsheet updates the database right away.

As I said before, some of the forms may not be loaded.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Enterprise All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group