scrolling window restriction problem

I have an application that uses a physical SQL table to store temporary 
information that fills a scrolling window.  It basically does the following:

1) user opens the window that contains the scrolling window
2) a script processes that runs a stored procedure that
    a) removes all records for this user
    b) puts records in the table for the currently viewed item
3) uses the "fill window" command to fill the scrolling window

This works fine until another user also opens up the window.  They get both 
the first users' and their data.

Is there a way to "restrict" the data that fills the scrolling window?  Do I 
have to put code in the LineFill Procedure to restrict it record by record?  
Is this the wrong way to fill the scrolling window?

Any help would be appreciated.
Don DeVeux
0
rengeek33 (60)
5/23/2006 11:05:02 PM
greatplains 29623 articles. 4 followers. Follow

7 Replies
800 Views

Similar Articles

[PageSpeed] 11

A "permanent" temporary table needs to ensure that it is unique for each 
company and user.

If it is a system series table, you must have Company ID and User ID as the 
first segments of all keys.

If it is company series table, you must have User ID as the first segement 
of all keys. The Company ID is no longer needed as the table is unique to the 
company DB.

When you populate the table fill in the User ID field with 'User ID' of 
globals and then make sure that User ID is set for your ranges.

Hope this helps.

David Musgrave [MSFT]
Senior Development Consultant
Escalation Engineer
MBS Support - Asia Pacific

Microsoft Business Solutions
http://www.microsoft.com/BusinessSolutions

mailto:dmusgrav@online.microsoft.com

Any views contained within are my personal views and 
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties, 
and confers no rights.  


"rengeek33" wrote:

> I have an application that uses a physical SQL table to store temporary 
> information that fills a scrolling window.  It basically does the following:
> 
> 1) user opens the window that contains the scrolling window
> 2) a script processes that runs a stored procedure that
>     a) removes all records for this user
>     b) puts records in the table for the currently viewed item
> 3) uses the "fill window" command to fill the scrolling window
> 
> This works fine until another user also opens up the window.  They get both 
> the first users' and their data.
> 
> Is there a way to "restrict" the data that fills the scrolling window?  Do I 
> have to put code in the LineFill Procedure to restrict it record by record?  
> Is this the wrong way to fill the scrolling window?
> 
> Any help would be appreciated.
> Don DeVeux
0
dmusgrav1 (1325)
5/24/2006 2:31:02 AM
David,

Thanks for your response.  I think I am already doing what you say, but let 
me give you some details for you to look at:

The "permanent" temporary table is company specific (it is created in each 
of the companies the client uses) and it does have a user id field (I call it 
curruserid to avoid conflict with the other user id field, which I need in 
the table for other reasons).  Each time the table is filled it brings in the 
data, plus the userid of the current user.

Even with this, the data that fills the scrolling window has the newly 
loaded data, plus any other data for other users.  It does not restrict it to 
the PO that I am looking at or the User ID that is running it.  

The index is declared using the curruserid as the last parameter.  Should I 
move that to the first parameter?  Will that make the difference?

Thanks,
Don

"David Musgrave [MSFT]" wrote:

> A "permanent" temporary table needs to ensure that it is unique for each 
> company and user.
> 
> If it is a system series table, you must have Company ID and User ID as the 
> first segments of all keys.
> 
> If it is company series table, you must have User ID as the first segement 
> of all keys. The Company ID is no longer needed as the table is unique to the 
> company DB.
> 
> When you populate the table fill in the User ID field with 'User ID' of 
> globals and then make sure that User ID is set for your ranges.
> 
> Hope this helps.
> 
> David Musgrave [MSFT]
> Senior Development Consultant
> Escalation Engineer
> MBS Support - Asia Pacific
> 
> Microsoft Business Solutions
> http://www.microsoft.com/BusinessSolutions
> 
> mailto:dmusgrav@online.microsoft.com
> 
> Any views contained within are my personal views and 
> not necessarily Microsoft Business Solutions policy.
> This posting is provided "AS IS" with no warranties, 
> and confers no rights.  
> 
> 
> "rengeek33" wrote:
> 
> > I have an application that uses a physical SQL table to store temporary 
> > information that fills a scrolling window.  It basically does the following:
> > 
> > 1) user opens the window that contains the scrolling window
> > 2) a script processes that runs a stored procedure that
> >     a) removes all records for this user
> >     b) puts records in the table for the currently viewed item
> > 3) uses the "fill window" command to fill the scrolling window
> > 
> > This works fine until another user also opens up the window.  They get both 
> > the first users' and their data.
> > 
> > Is there a way to "restrict" the data that fills the scrolling window?  Do I 
> > have to put code in the LineFill Procedure to restrict it record by record?  
> > Is this the wrong way to fill the scrolling window?
> > 
> > Any help would be appreciated.
> > Don DeVeux
0
rengeek33 (60)
5/24/2006 1:51:01 PM
Hi Don

I would make sure that your curruserid field is the first field in all keys 
created on this table.

It is also possible that you are not creating a "well defined" range and 
that is what is causing your problem.  This is a concept that is a little 
complex to describe, but here goes....

When Dexterity was used with ISAM databases, ranges created were always 
inclusive. You define the start record in a key and the end record in a key 
and all records in between are included in the range.

With SQL, ranges by default are exclusive.  So a where clause is created and 
each field must meet the limits defined.  

Given the data below and a range of  Start: HDR = 1, LINE = 1 to End : HDR = 
2, LINE = 2

HDR  LINE
  1      1
  1      2
  1      3
  2      1
  2      2

ISAM would produce all 5 records in the inclusive range

SQL would produce 4 records in the exclusive range as record 1,3 does not 
have the HDR between 1 & 2 AND LINE between 1 & 2.

A well defined range is one where the inclusive and exclusive ranges always 
return the same record set.

The rules to create a Well Defined range are as follows:

Working down the key fields from the first to the last field in the key you 
are using.

1) You can 0 or more fields where the Start and End have the same value
2) You can have 0 or 1 field where the Start and End have different values.
3) All fields remaining (if any) must be cleared (C) and filled (F).

The example above was not well defined as the start and end values for the 
two fields were different.  This breaks rule 2.

To make it well defined it would need to be  Start: HDR = 1, LINE = C to End 
: HDR = 2, LINE = F

Hopefully this makes sense.

David Musgrave [MSFT]
Senior Development Consultant
Escalation Engineer
MBS Support - Asia Pacific

Microsoft Business Solutions
http://www.microsoft.com/BusinessSolutions

mailto:dmusgrav@online.microsoft.com

Any views contained within are my personal views and 
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties, 
and confers no rights.  




"rengeek33" wrote:

> David,
> 
> Thanks for your response.  I think I am already doing what you say, but let 
> me give you some details for you to look at:
> 
> The "permanent" temporary table is company specific (it is created in each 
> of the companies the client uses) and it does have a user id field (I call it 
> curruserid to avoid conflict with the other user id field, which I need in 
> the table for other reasons).  Each time the table is filled it brings in the 
> data, plus the userid of the current user.
> 
> Even with this, the data that fills the scrolling window has the newly 
> loaded data, plus any other data for other users.  It does not restrict it to 
> the PO that I am looking at or the User ID that is running it.  
> 
> The index is declared using the curruserid as the last parameter.  Should I 
> move that to the first parameter?  Will that make the difference?
> 
> Thanks,
> Don
> 
> "David Musgrave [MSFT]" wrote:
> 
> > A "permanent" temporary table needs to ensure that it is unique for each 
> > company and user.
> > 
> > If it is a system series table, you must have Company ID and User ID as the 
> > first segments of all keys.
> > 
> > If it is company series table, you must have User ID as the first segement 
> > of all keys. The Company ID is no longer needed as the table is unique to the 
> > company DB.
> > 
> > When you populate the table fill in the User ID field with 'User ID' of 
> > globals and then make sure that User ID is set for your ranges.
> > 
> > Hope this helps.
> > 
> > David Musgrave [MSFT]
> > Senior Development Consultant
> > Escalation Engineer
> > MBS Support - Asia Pacific
> > 
> > Microsoft Business Solutions
> > http://www.microsoft.com/BusinessSolutions
> > 
> > mailto:dmusgrav@online.microsoft.com
> > 
> > Any views contained within are my personal views and 
> > not necessarily Microsoft Business Solutions policy.
> > This posting is provided "AS IS" with no warranties, 
> > and confers no rights.  
> > 
> > 
> > "rengeek33" wrote:
> > 
> > > I have an application that uses a physical SQL table to store temporary 
> > > information that fills a scrolling window.  It basically does the following:
> > > 
> > > 1) user opens the window that contains the scrolling window
> > > 2) a script processes that runs a stored procedure that
> > >     a) removes all records for this user
> > >     b) puts records in the table for the currently viewed item
> > > 3) uses the "fill window" command to fill the scrolling window
> > > 
> > > This works fine until another user also opens up the window.  They get both 
> > > the first users' and their data.
> > > 
> > > Is there a way to "restrict" the data that fills the scrolling window?  Do I 
> > > have to put code in the LineFill Procedure to restrict it record by record?  
> > > Is this the wrong way to fill the scrolling window?
> > > 
> > > Any help would be appreciated.
> > > Don DeVeux
0
dmusgrav1 (1325)
5/24/2006 2:43:02 PM
David,

What you says makes sense in and of itself, but I'm not sure where it 
applies here.  I am not using ranges to define my report - maybe that's the 
issue.  

Here is the code that fills the scrolling window:
*********************************
local long stat;
local long err;
local string userid;
local string dbname;
userid = 'User ID' of globals;
dbname = 'Intercompany ID' of globals;
stat = 0;
{this calls a stored procedure that fills the temp table with the 
appropriate records. As you see, it is passed PO Number, Ord, and userid}
call Fill_POPCOLineTemp, stat, 'PO Number', 'Ord', userid;
{this uses that table to fill the scrolling window, based on the 
POP_PO_Ord_Date index - see below for its definition}
fill window POP_CO_Scrolling of form POP_CO_Entry by POP_PO_Ord_Date;
 (other code runs here, but it has nothing to do with the scrolling window)
****************
The table (AKAPOP10115) has the index (POP_PO_Ord_Date) which has the 
following segments:
Current User ID
PO Number
Ord
Document Date

Where does the range come into this?
Don

"David Musgrave [MSFT]" wrote:

> Hi Don
> 
> I would make sure that your curruserid field is the first field in all keys 
> created on this table.
> 
> It is also possible that you are not creating a "well defined" range and 
> that is what is causing your problem.  This is a concept that is a little 
> complex to describe, but here goes....
> 
> When Dexterity was used with ISAM databases, ranges created were always 
> inclusive. You define the start record in a key and the end record in a key 
> and all records in between are included in the range.
> 
> With SQL, ranges by default are exclusive.  So a where clause is created and 
> each field must meet the limits defined.  
> 
> Given the data below and a range of  Start: HDR = 1, LINE = 1 to End : HDR = 
> 2, LINE = 2
> 
> HDR  LINE
>   1      1
>   1      2
>   1      3
>   2      1
>   2      2
> 
> ISAM would produce all 5 records in the inclusive range
> 
> SQL would produce 4 records in the exclusive range as record 1,3 does not 
> have the HDR between 1 & 2 AND LINE between 1 & 2.
> 
> A well defined range is one where the inclusive and exclusive ranges always 
> return the same record set.
> 
> The rules to create a Well Defined range are as follows:
> 
> Working down the key fields from the first to the last field in the key you 
> are using.
> 
> 1) You can 0 or more fields where the Start and End have the same value
> 2) You can have 0 or 1 field where the Start and End have different values.
> 3) All fields remaining (if any) must be cleared (C) and filled (F).
> 
> The example above was not well defined as the start and end values for the 
> two fields were different.  This breaks rule 2.
> 
> To make it well defined it would need to be  Start: HDR = 1, LINE = C to End 
> : HDR = 2, LINE = F
> 
> Hopefully this makes sense.
> 
> David Musgrave [MSFT]
> Senior Development Consultant
> Escalation Engineer
> MBS Support - Asia Pacific
> 
> Microsoft Business Solutions
> http://www.microsoft.com/BusinessSolutions
> 
> mailto:dmusgrav@online.microsoft.com
> 
> Any views contained within are my personal views and 
> not necessarily Microsoft Business Solutions policy.
> This posting is provided "AS IS" with no warranties, 
> and confers no rights.  
> 
> 
> 
> 
> "rengeek33" wrote:
> 
> > David,
> > 
> > Thanks for your response.  I think I am already doing what you say, but let 
> > me give you some details for you to look at:
> > 
> > The "permanent" temporary table is company specific (it is created in each 
> > of the companies the client uses) and it does have a user id field (I call it 
> > curruserid to avoid conflict with the other user id field, which I need in 
> > the table for other reasons).  Each time the table is filled it brings in the 
> > data, plus the userid of the current user.
> > 
> > Even with this, the data that fills the scrolling window has the newly 
> > loaded data, plus any other data for other users.  It does not restrict it to 
> > the PO that I am looking at or the User ID that is running it.  
> > 
> > The index is declared using the curruserid as the last parameter.  Should I 
> > move that to the first parameter?  Will that make the difference?
> > 
> > Thanks,
> > Don
> > 
> > "David Musgrave [MSFT]" wrote:
> > 
> > > A "permanent" temporary table needs to ensure that it is unique for each 
> > > company and user.
> > > 
> > > If it is a system series table, you must have Company ID and User ID as the 
> > > first segments of all keys.
> > > 
> > > If it is company series table, you must have User ID as the first segement 
> > > of all keys. The Company ID is no longer needed as the table is unique to the 
> > > company DB.
> > > 
> > > When you populate the table fill in the User ID field with 'User ID' of 
> > > globals and then make sure that User ID is set for your ranges.
> > > 
> > > Hope this helps.
> > > 
> > > David Musgrave [MSFT]
> > > Senior Development Consultant
> > > Escalation Engineer
> > > MBS Support - Asia Pacific
> > > 
> > > Microsoft Business Solutions
> > > http://www.microsoft.com/BusinessSolutions
> > > 
> > > mailto:dmusgrav@online.microsoft.com
> > > 
> > > Any views contained within are my personal views and 
> > > not necessarily Microsoft Business Solutions policy.
> > > This posting is provided "AS IS" with no warranties, 
> > > and confers no rights.  
> > > 
> > > 
> > > "rengeek33" wrote:
> > > 
> > > > I have an application that uses a physical SQL table to store temporary 
> > > > information that fills a scrolling window.  It basically does the following:
> > > > 
> > > > 1) user opens the window that contains the scrolling window
> > > > 2) a script processes that runs a stored procedure that
> > > >     a) removes all records for this user
> > > >     b) puts records in the table for the currently viewed item
> > > > 3) uses the "fill window" command to fill the scrolling window
> > > > 
> > > > This works fine until another user also opens up the window.  They get both 
> > > > the first users' and their data.
> > > > 
> > > > Is there a way to "restrict" the data that fills the scrolling window?  Do I 
> > > > have to put code in the LineFill Procedure to restrict it record by record?  
> > > > Is this the wrong way to fill the scrolling window?
> > > > 
> > > > Any help would be appreciated.
> > > > Don DeVeux
0
rengeek33 (60)
5/24/2006 3:41:01 PM
Hi Don

No range is definately your problem.

Without a range you will be seeing all records in the table for all users in 
the company. You need the range to limit the user to the current user id.  

Here is a future proof range setting code example for your table.  It is 
future proof as it will automatically handle if additional fields are added 
to your key. This is because it uses clear table & fill table to clear & fill 
all fields and so does not need to mention the other fields in the key.

range clear table POPCOLineTemp;

clear table POPCOLineTemp;
'Current User ID' of table POPCOLineTemp = 'User ID' of globals;
range start table POPCOLineTemp by POP_PO_Ord_Date;

fill table POPCOLineTemp;
'Current User ID' of table POPCOLineTemp = 'User ID' of globals;
range end table POPCOLineTemp by POP_PO_Ord_Date;

Apply this range before filling the scrolling window to limit the records to 
the one user.

I would also recommend adding Table_SetRefreshFlags(table POPCOLineTemp) to 
the end your prototype procedure to force the table to re-read after the 
sproc has completed.

Hope this helps.

David Musgrave [MSFT]
Senior Development Consultant
Escalation Engineer
MBS Support - Asia Pacific

Microsoft Business Solutions
http://www.microsoft.com/BusinessSolutions

mailto:dmusgrav@online.microsoft.com

Any views contained within are my personal views and 
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties, 
and confers no rights.  


"rengeek33" wrote:

> David,
> 
> What you says makes sense in and of itself, but I'm not sure where it 
> applies here.  I am not using ranges to define my report - maybe that's the 
> issue.  
> 
> Here is the code that fills the scrolling window:
> *********************************
> local long stat;
> local long err;
> local string userid;
> local string dbname;
> userid = 'User ID' of globals;
> dbname = 'Intercompany ID' of globals;
> stat = 0;
> {this calls a stored procedure that fills the temp table with the 
> appropriate records. As you see, it is passed PO Number, Ord, and userid}
> call Fill_POPCOLineTemp, stat, 'PO Number', 'Ord', userid;
> {this uses that table to fill the scrolling window, based on the 
> POP_PO_Ord_Date index - see below for its definition}
> fill window POP_CO_Scrolling of form POP_CO_Entry by POP_PO_Ord_Date;
>  (other code runs here, but it has nothing to do with the scrolling window)
> ****************
> The table (AKAPOP10115) has the index (POP_PO_Ord_Date) which has the 
> following segments:
> Current User ID
> PO Number
> Ord
> Document Date
> 
> Where does the range come into this?
> Don
> 
> "David Musgrave [MSFT]" wrote:
> 
> > Hi Don
> > 
> > I would make sure that your curruserid field is the first field in all keys 
> > created on this table.
> > 
> > It is also possible that you are not creating a "well defined" range and 
> > that is what is causing your problem.  This is a concept that is a little 
> > complex to describe, but here goes....
> > 
> > When Dexterity was used with ISAM databases, ranges created were always 
> > inclusive. You define the start record in a key and the end record in a key 
> > and all records in between are included in the range.
> > 
> > With SQL, ranges by default are exclusive.  So a where clause is created and 
> > each field must meet the limits defined.  
> > 
> > Given the data below and a range of  Start: HDR = 1, LINE = 1 to End : HDR = 
> > 2, LINE = 2
> > 
> > HDR  LINE
> >   1      1
> >   1      2
> >   1      3
> >   2      1
> >   2      2
> > 
> > ISAM would produce all 5 records in the inclusive range
> > 
> > SQL would produce 4 records in the exclusive range as record 1,3 does not 
> > have the HDR between 1 & 2 AND LINE between 1 & 2.
> > 
> > A well defined range is one where the inclusive and exclusive ranges always 
> > return the same record set.
> > 
> > The rules to create a Well Defined range are as follows:
> > 
> > Working down the key fields from the first to the last field in the key you 
> > are using.
> > 
> > 1) You can 0 or more fields where the Start and End have the same value
> > 2) You can have 0 or 1 field where the Start and End have different values.
> > 3) All fields remaining (if any) must be cleared (C) and filled (F).
> > 
> > The example above was not well defined as the start and end values for the 
> > two fields were different.  This breaks rule 2.
> > 
> > To make it well defined it would need to be  Start: HDR = 1, LINE = C to End 
> > : HDR = 2, LINE = F
> > 
> > Hopefully this makes sense.
> > 
> > David Musgrave [MSFT]
> > Senior Development Consultant
> > Escalation Engineer
> > MBS Support - Asia Pacific
> > 
> > Microsoft Business Solutions
> > http://www.microsoft.com/BusinessSolutions
> > 
> > mailto:dmusgrav@online.microsoft.com
> > 
> > Any views contained within are my personal views and 
> > not necessarily Microsoft Business Solutions policy.
> > This posting is provided "AS IS" with no warranties, 
> > and confers no rights.  
> > 
> > 
> > 
> > 
> > "rengeek33" wrote:
> > 
> > > David,
> > > 
> > > Thanks for your response.  I think I am already doing what you say, but let 
> > > me give you some details for you to look at:
> > > 
> > > The "permanent" temporary table is company specific (it is created in each 
> > > of the companies the client uses) and it does have a user id field (I call it 
> > > curruserid to avoid conflict with the other user id field, which I need in 
> > > the table for other reasons).  Each time the table is filled it brings in the 
> > > data, plus the userid of the current user.
> > > 
> > > Even with this, the data that fills the scrolling window has the newly 
> > > loaded data, plus any other data for other users.  It does not restrict it to 
> > > the PO that I am looking at or the User ID that is running it.  
> > > 
> > > The index is declared using the curruserid as the last parameter.  Should I 
> > > move that to the first parameter?  Will that make the difference?
> > > 
> > > Thanks,
> > > Don
> > > 
> > > "David Musgrave [MSFT]" wrote:
> > > 
> > > > A "permanent" temporary table needs to ensure that it is unique for each 
> > > > company and user.
> > > > 
> > > > If it is a system series table, you must have Company ID and User ID as the 
> > > > first segments of all keys.
> > > > 
> > > > If it is company series table, you must have User ID as the first segement 
> > > > of all keys. The Company ID is no longer needed as the table is unique to the 
> > > > company DB.
> > > > 
> > > > When you populate the table fill in the User ID field with 'User ID' of 
> > > > globals and then make sure that User ID is set for your ranges.
> > > > 
> > > > Hope this helps.
> > > > 
> > > > David Musgrave [MSFT]
> > > > Senior Development Consultant
> > > > Escalation Engineer
> > > > MBS Support - Asia Pacific
> > > > 
> > > > Microsoft Business Solutions
> > > > http://www.microsoft.com/BusinessSolutions
> > > > 
> > > > mailto:dmusgrav@online.microsoft.com
> > > > 
> > > > Any views contained within are my personal views and 
> > > > not necessarily Microsoft Business Solutions policy.
> > > > This posting is provided "AS IS" with no warranties, 
> > > > and confers no rights.  
> > > > 
> > > > 
> > > > "rengeek33" wrote:
> > > > 
> > > > > I have an application that uses a physical SQL table to store temporary 
> > > > > information that fills a scrolling window.  It basically does the following:
> > > > > 
> > > > > 1) user opens the window that contains the scrolling window
> > > > > 2) a script processes that runs a stored procedure that
> > > > >     a) removes all records for this user
> > > > >     b) puts records in the table for the currently viewed item
> > > > > 3) uses the "fill window" command to fill the scrolling window
> > > > > 
> > > > > This works fine until another user also opens up the window.  They get both 
> > > > > the first users' and their data.
> > > > > 
> > > > > Is there a way to "restrict" the data that fills the scrolling window?  Do I 
> > > > > have to put code in the LineFill Procedure to restrict it record by record?  
> > > > > Is this the wrong way to fill the scrolling window?
> > > > > 
> > > > > Any help would be appreciated.
> > > > > Don DeVeux
0
dmusgrav1 (1325)
5/24/2006 4:00:02 PM
U da man!

That did it.  I should start paying you for Dexterity tutoring lessons.

Thanks,
Don

"David Musgrave [MSFT]" wrote:

> Hi Don
> 
> No range is definately your problem.
> 
> Without a range you will be seeing all records in the table for all users in 
> the company. You need the range to limit the user to the current user id.  
> 
> Here is a future proof range setting code example for your table.  It is 
> future proof as it will automatically handle if additional fields are added 
> to your key. This is because it uses clear table & fill table to clear & fill 
> all fields and so does not need to mention the other fields in the key.
> 
> range clear table POPCOLineTemp;
> 
> clear table POPCOLineTemp;
> 'Current User ID' of table POPCOLineTemp = 'User ID' of globals;
> range start table POPCOLineTemp by POP_PO_Ord_Date;
> 
> fill table POPCOLineTemp;
> 'Current User ID' of table POPCOLineTemp = 'User ID' of globals;
> range end table POPCOLineTemp by POP_PO_Ord_Date;
> 
> Apply this range before filling the scrolling window to limit the records to 
> the one user.
> 
> I would also recommend adding Table_SetRefreshFlags(table POPCOLineTemp) to 
> the end your prototype procedure to force the table to re-read after the 
> sproc has completed.
> 
> Hope this helps.
> 
> David Musgrave [MSFT]
> Senior Development Consultant
> Escalation Engineer
> MBS Support - Asia Pacific
> 
> Microsoft Business Solutions
> http://www.microsoft.com/BusinessSolutions
> 
> mailto:dmusgrav@online.microsoft.com
> 
> Any views contained within are my personal views and 
> not necessarily Microsoft Business Solutions policy.
> This posting is provided "AS IS" with no warranties, 
> and confers no rights.  
> 
> 
> "rengeek33" wrote:
> 
> > David,
> > 
> > What you says makes sense in and of itself, but I'm not sure where it 
> > applies here.  I am not using ranges to define my report - maybe that's the 
> > issue.  
> > 
> > Here is the code that fills the scrolling window:
> > *********************************
> > local long stat;
> > local long err;
> > local string userid;
> > local string dbname;
> > userid = 'User ID' of globals;
> > dbname = 'Intercompany ID' of globals;
> > stat = 0;
> > {this calls a stored procedure that fills the temp table with the 
> > appropriate records. As you see, it is passed PO Number, Ord, and userid}
> > call Fill_POPCOLineTemp, stat, 'PO Number', 'Ord', userid;
> > {this uses that table to fill the scrolling window, based on the 
> > POP_PO_Ord_Date index - see below for its definition}
> > fill window POP_CO_Scrolling of form POP_CO_Entry by POP_PO_Ord_Date;
> >  (other code runs here, but it has nothing to do with the scrolling window)
> > ****************
> > The table (AKAPOP10115) has the index (POP_PO_Ord_Date) which has the 
> > following segments:
> > Current User ID
> > PO Number
> > Ord
> > Document Date
> > 
> > Where does the range come into this?
> > Don
> > 
> > "David Musgrave [MSFT]" wrote:
> > 
> > > Hi Don
> > > 
> > > I would make sure that your curruserid field is the first field in all keys 
> > > created on this table.
> > > 
> > > It is also possible that you are not creating a "well defined" range and 
> > > that is what is causing your problem.  This is a concept that is a little 
> > > complex to describe, but here goes....
> > > 
> > > When Dexterity was used with ISAM databases, ranges created were always 
> > > inclusive. You define the start record in a key and the end record in a key 
> > > and all records in between are included in the range.
> > > 
> > > With SQL, ranges by default are exclusive.  So a where clause is created and 
> > > each field must meet the limits defined.  
> > > 
> > > Given the data below and a range of  Start: HDR = 1, LINE = 1 to End : HDR = 
> > > 2, LINE = 2
> > > 
> > > HDR  LINE
> > >   1      1
> > >   1      2
> > >   1      3
> > >   2      1
> > >   2      2
> > > 
> > > ISAM would produce all 5 records in the inclusive range
> > > 
> > > SQL would produce 4 records in the exclusive range as record 1,3 does not 
> > > have the HDR between 1 & 2 AND LINE between 1 & 2.
> > > 
> > > A well defined range is one where the inclusive and exclusive ranges always 
> > > return the same record set.
> > > 
> > > The rules to create a Well Defined range are as follows:
> > > 
> > > Working down the key fields from the first to the last field in the key you 
> > > are using.
> > > 
> > > 1) You can 0 or more fields where the Start and End have the same value
> > > 2) You can have 0 or 1 field where the Start and End have different values.
> > > 3) All fields remaining (if any) must be cleared (C) and filled (F).
> > > 
> > > The example above was not well defined as the start and end values for the 
> > > two fields were different.  This breaks rule 2.
> > > 
> > > To make it well defined it would need to be  Start: HDR = 1, LINE = C to End 
> > > : HDR = 2, LINE = F
> > > 
> > > Hopefully this makes sense.
> > > 
> > > David Musgrave [MSFT]
> > > Senior Development Consultant
> > > Escalation Engineer
> > > MBS Support - Asia Pacific
> > > 
> > > Microsoft Business Solutions
> > > http://www.microsoft.com/BusinessSolutions
> > > 
> > > mailto:dmusgrav@online.microsoft.com
> > > 
> > > Any views contained within are my personal views and 
> > > not necessarily Microsoft Business Solutions policy.
> > > This posting is provided "AS IS" with no warranties, 
> > > and confers no rights.  
> > > 
> > > 
> > > 
> > > 
> > > "rengeek33" wrote:
> > > 
> > > > David,
> > > > 
> > > > Thanks for your response.  I think I am already doing what you say, but let 
> > > > me give you some details for you to look at:
> > > > 
> > > > The "permanent" temporary table is company specific (it is created in each 
> > > > of the companies the client uses) and it does have a user id field (I call it 
> > > > curruserid to avoid conflict with the other user id field, which I need in 
> > > > the table for other reasons).  Each time the table is filled it brings in the 
> > > > data, plus the userid of the current user.
> > > > 
> > > > Even with this, the data that fills the scrolling window has the newly 
> > > > loaded data, plus any other data for other users.  It does not restrict it to 
> > > > the PO that I am looking at or the User ID that is running it.  
> > > > 
> > > > The index is declared using the curruserid as the last parameter.  Should I 
> > > > move that to the first parameter?  Will that make the difference?
> > > > 
> > > > Thanks,
> > > > Don
> > > > 
> > > > "David Musgrave [MSFT]" wrote:
> > > > 
> > > > > A "permanent" temporary table needs to ensure that it is unique for each 
> > > > > company and user.
> > > > > 
> > > > > If it is a system series table, you must have Company ID and User ID as the 
> > > > > first segments of all keys.
> > > > > 
> > > > > If it is company series table, you must have User ID as the first segement 
> > > > > of all keys. The Company ID is no longer needed as the table is unique to the 
> > > > > company DB.
> > > > > 
> > > > > When you populate the table fill in the User ID field with 'User ID' of 
> > > > > globals and then make sure that User ID is set for your ranges.
> > > > > 
> > > > > Hope this helps.
> > > > > 
> > > > > David Musgrave [MSFT]
> > > > > Senior Development Consultant
> > > > > Escalation Engineer
> > > > > MBS Support - Asia Pacific
> > > > > 
> > > > > Microsoft Business Solutions
> > > > > http://www.microsoft.com/BusinessSolutions
> > > > > 
> > > > > mailto:dmusgrav@online.microsoft.com
> > > > > 
> > > > > Any views contained within are my personal views and 
> > > > > not necessarily Microsoft Business Solutions policy.
> > > > > This posting is provided "AS IS" with no warranties, 
> > > > > and confers no rights.  
> > > > > 
> > > > > 
> > > > > "rengeek33" wrote:
> > > > > 
> > > > > > I have an application that uses a physical SQL table to store temporary 
> > > > > > information that fills a scrolling window.  It basically does the following:
> > > > > > 
> > > > > > 1) user opens the window that contains the scrolling window
> > > > > > 2) a script processes that runs a stored procedure that
> > > > > >     a) removes all records for this user
> > > > > >     b) puts records in the table for the currently viewed item
> > > > > > 3) uses the "fill window" command to fill the scrolling window
> > > > > > 
> > > > > > This works fine until another user also opens up the window.  They get both 
> > > > > > the first users' and their data.
> > > > > > 
> > > > > > Is there a way to "restrict" the data that fills the scrolling window?  Do I 
> > > > > > have to put code in the LineFill Procedure to restrict it record by record?  
> > > > > > Is this the wrong way to fill the scrolling window?
> > > > > > 
> > > > > > Any help would be appreciated.
> > > > > > Don DeVeux
0
rengeek33 (60)
5/24/2006 5:12:02 PM
When it comes to Dex, David Musgrave has been 'da man' for a long time!

Mark (DynamicAccounting.net)

0
mpolino (496)
5/24/2006 6:06:51 PM
Reply:

Similar Artilces:

Windows 7 beta
When I try to run a monthly report in Windows 7 beta it says Internet Explorer 6 is required. Is there a fix for this? This is MS Money Plus Deluxe version 17.0.120.1415 with IE 8 beta. I will try uninstalling IE 8. "Todd Major" wrote: > When I try to run a monthly report in Windows 7 beta it says Internet > Explorer 6 is required. Is there a fix for this? Todd Major | 2009-01-24 | 2:19:02 PM wrote: >When I try to run a monthly report in Windows 7 beta it says Internet >Explorer 6 is required. Is there a fix for this? You'll have to wait for an upgrade...

vlookup problem #11
Excel 2002 SP3 Win XP HE SP1 hi, altho i have done this countless times in the past, i can't get my vlookup to work (i'm a bit rusty on it). i have 2 separate sheets in 2 separate xls files. sheet a) has a table with columns a,b,c,d,e and rows 2 to 300. all cells are populated with text, names, etc. sheet b) has same a,b,c,d,e column headers but rows 2 to 900. only column c is populated with a key (or id) in sheet b). there are many matches/duplicates in sheet b) that are contained in sheet a) based on the key/id in column c. i am trying to populate the corresponding cells in...

fields problem with workflow -
Hi, I am using entity service activities in worlfow manager. I can add "Schedule start data and Schedule end date" but when i use auto e-mail i can not see any data infront of Schedule start and schedule end .............and also Created on . basically i am using send e-mail when assigned to someone by having different fields on e-mail. am i doing something wrong or :( Aami ...

Problem with multiple users -- Won't Open (Error 3734)
I have 2 users that need to work on the same database simultaneously. I have encountered an odd problem. If one user is in the database the other user receives a message that the other user has placed the database in a state that prevents it from being opened or locked. The help facility indicates that this error occurs when "the new passive shutdown / connection is being used". I did not, nor do I know how to enable this feature. How do I turn it off, so multiple people can work on the database simultaneously. (Note: They are not choosing to open the database in exclusi...

Scrolling with CScrollView
Hi everyone, Let me start by saying that I'm rather new to scrolling. I have come accross the following problem. I created a new SDI MFC application that uses CScrollView with Visual Studio .NET 2003. Then I have increased the size in CScrollView::OnInitialUpdate() to 1000 by 1000. Finally I have added the following code in CScrollView::OnDraw(), // TODO: add draw code for native data here CRect rect; GetClientRect (&rect); CString str_scroll; str_scroll.Format(_T(" x = %i y = %i "), GetScrollPosition().x, GetScrollPosition().y); pDC->DrawText(str_scroll, -1, &...

drawing anywhere onscreen by using transparent window?
Hi, I am looking for an example of how to create a transparent window that I can position anywhere on the screen and draw to it using the GDI. So basically it would look like I am drawing on the screen over top of everything, but really I am just drawing to my transparent window. Anyone know how to do this and/or know where there is an example of how to do this? Thanks, gman you can make window with WS_POPUP style or use as a parent HWND_DESKTOP. Then override its OnEraseBkgnd and return TRUE - this should stop CWnd from filling background with white color. All drawing do in OnPai...

Windows mail comes alright but then disappears
Hello, Background I run my Gmail thorugh Windows mail. The settings in Gmail is activated for pop. The settings in Windows mail are “recent: my.name@gmail.com”. The server port settings are 25/995. Furthermore I use Windows Vista, F-secure, Internet Explorer 7. Windows Mail arrives alright. To the inbox. I can open it and so on. Problem comes when I have a look in another folder in Windows mail, such as sent or junk. Then the newly arrived mail just disappears from the Windows mail. It can still be found in the Gmail, but that´s not what I want. What am I doing wrong...

font and pen problem?
I recently modified a block of code that allows me and my brother to observe the names of audio files being played. The change included using a background bitmap blit to erase the former text, as well as specifying a font and pen. Now I can see the improved output, but he no longer sees text. Here's the code, in case someone might be able to tell me where the problem lies. I appreciate it very much. This is only my second attempt to use a specific font and pen. void CPattern::ShowText() { CRect rect; m_pView->GetClientRect(&rect); CClientDC dc(m_pView); dc.SetBkMode(TRANSP...

Connecting to domain on SBS 2003 after windows xp sp3 repair
I'm having a problem with a computer at work. The computer is a dell optiplex gx270 it runs windows xp pro sp3. It is part of the office domain. A few days ago there was a problem shutting it down cleanly. As a result the person just hit the power button to shut the pc off. After that when the computer started it would boot and go through the windows start up but would when you tried to hit ctrl-alt-del to log in nothing would happen. There was absolutely no way to log on. I tried doing a manual rollback of the registry to a few days before the initial incident but that didn't ...

Scrolling sync subforms
Hi all I have a continuous subform which shows all claim details, that have Part(s) against them. The claims are a one to many with the Parts. I wanted to show a count on the form of parts against each claim. If I add a count to the recordsource query then I lose the ability to edit the data in the subform. I need to do this to add a Selector code if the user wants to mark the claim as a selection. Instead I have created another continuous subform, this has just the claim ref and the count of parts. Each form has the same sort order and a vertical scroll bar - is it possibl...

Software Distribution
Hi, I try to install software using msi with mst. Software supplier told that I must run msi two times. First for some options and secound for another ( language option ). I try solve this with two way: 1) Add two mst to one package. I prepare mst with ORCA. After add secound mst and click OK i got error: "An error occurred accessing the software installation data in the active directory" and event log: Event id 110: Software Installation was unable to generate the script for \\dc\client.msi. The following error was encountered: Error applying transforms. Veri...

scroll bar gone
hi have money 2005 premium and in my checkbook area where you pick the category the scroll bar is gone and it only shows me the categories that fit in that window. if i go into split and select the categories from within there the scroll bar is there. Does anyone see this problem or have a fix for it. Thanks, minnoce944 In that nobody else has M05, it would be hard to comment. "Mike I" <minnoce944@hotmail.com> wrote in message news:u9aY7B1fEHA.384@TK2MSFTNGP10.phx.gbl... > hi have money 2005 premium and in my checkbook area where you pick the > category the scroll b...

Outlook slow following windows/office update
My Outlook 2002 is maddeningly slow following updates....cannot uninstall office SP2. Outlook runs very slowly when clicking from one folder or email message to the next..........even on already read messages. Any ideas? I might have to uninstall the whole lot & start again as it is so annoying, but I'd rather not have to....PDA sync to re set up etc! Thanks Julie Try turning off the "Instant Messaging" Open the TOOLS menu Select OPTIONS... Select the OTHER tab Turn off the check mark next to "Enable Instant Messaging on Microsoft Outlook" -- Nikki Peterson...

Problem exporting data to Excel using Access VBA 04-07-10
My code works fine on PCs using Windows XP. This problem only occurs on a Windows 7 PC. It worked OK when I first started using my Windows 7 PC, for a while it worked spasmodically – I could get it to work again by doing a compact and repair on the mdb and rebooting. Now it hasgotten to the place where it does not work at all. Also, I make sure the code is compiled and saved. The problem occurs on this line of code: .Refresh BackgroundQuery:=False 'error 1004 on this line Excel has opened, and I get a dialog box entitled “Please enter MSJet OLE DB Initialization Informatio...

Scroll-me-down
Hi there, I am using RichEditCtrl and all the associated select, format, replace for adding text to the end of my rich edit box. However, I have yet to figure out a definative way of making it scroll down as far as needed (bottom of page if page length is greater than height), it sometimes works, if the cursor position is right at the very end of the text when the text is added programatically, but I need a way for when it is not. Could anyone give me any tips? - MR Mark Randall wrote: > Hi there, > > I am using RichEditCtrl and all the associated select, format, repla...

How do you restore the Shapes window after closing it?
When you first open Visio, the Shapes selection window is on the left hand side. If you click on the X in the upper right hand side of that window to close it, how do you get it to reappear? Just open any stencil from Files \ Shapes \ xxx "bearden65" <bearden65@discussions.microsoft.com> wrote in message news:93BAE663-B49D-4333-8F17-1DFE8D4C9CF8@microsoft.com... > When you first open Visio, the Shapes selection window is on the left hand > side. If you click on the X in the upper right hand side of that window > to > close it, how do you get it to reappear? ...

Restrict cells selected to specific range name
HI, I would like to restrict selection of cells to only a range say the dimensions of a range name. Is this possibly in VBA please. EG My rangename is Weeks which is the range A1:B10 and i dont want any users to access cells outside of this range. Hope that makes sense. Thanks JB try using Scrollarea property to set scrollarea Worksheets(1).ScrollArea = "A1:B10" to clear Worksheets(1).ScrollArea = " " -- jb "John" wrote: > HI, > > I would like to restrict selection of cells to only a range say the > dimensi...

DPM 2010 Exceptions when connecting to a Windows 2003 Machine
I throw a DPMException error expanding a server when modifying the protection group. I.E. when I try to add a server to a protection group it crashes the interface. It happens on 4 servers all of which are Windows 2003 Virtual Machines. I have 5 other successful Windows 2003 Virtual machine connection and 30+ Windows Server 2008 R2 Connections. Here is the error on the server: Fault bucket 754861567, type 5 Event Name: DPMException Response: Not available Cab Id: 0 Problem signature: P1: DPM P2: 3.0.7336.0 P3: mmc.exe P4: 6.1.7600.16385 P5: System.IndexOutOfRangeExcep...

Windows Mail
I receive email without a problem but after I close Windows mail all the emails I have in my in box are gone. While I was working on an email earlier all the emails I had in my in box about 85, all where gone and never to return. What do I do to correct this problem -- Jackh Do you have outlook as well on your machine.. if sao check if you have set outlook as your default or check the emails are still there through this work around to backup your emails.. and restore http://www.vistax64.com/vista-general/262257-best-way-backup-win-email.html -- ashvin :D Just chill -...

Scroll the screen view with the scroll bar
On some of my Excel sheets, the screen doesn't scroll along when I move the scroll bar. It just jumps to the new location when I stop moving the scroll bar. What is the correct setting to change so that the screen scrolls at the same time? Do you use different versions of excel? In earlier versions, when you moved the scrollbar, you saw a little yellow tooltip show you what row you were on. In newer versions, the screen moved. (I've forgotten the version that first added the live scrolling. Maybe someone can chime in with it.) avbs wrote: > > On some of my Excel sheet...

X Axis, Excel 2007 problem...
I'm sure this is a super simple question. I just started testing some simple charts in 2007. I have a small grid with 4 years and 4 dollar values. (years are 2004, 2005, 2006, 2007). I want to make a simple bar chart with the $ values on the Y axis and the Years on the x axis. The Dollar values and bars display properly but the X axis lists 1, 2, 3, 4 under the bars rather than the years. I can't seem to find the ribbon or menu to change this to display the years. Any help is appreciated. Ever since Excel 1997, there has been this problem. If the x-values are numeric and y...

window.showmodaldialog
Below is the code I am using in the ISV.config instead of the URL feature. I am using is because I want to create a track what my child window is doing so I can kickoff the SaveAsCompleted () function AFTER the cloning of my current form is completed. I can't seem to get it to work. My error is "window.execScript(action)" <Button Icon="/_imgs/ico_16_4210_d.gif" JavaScript="var pcall = crmForm; cpcObject = New Object(); cpcObject.OId = pcall.ObjectId; cpcOject.OTC = pcall.O...

Smartlist version problem
We upgraded our SBF from v8 to v9 and now smartlist says its not registered, but it looks like a version error because when we go to the About option and see what version numbers the smartlist still says v8 not v9, any ideas or could you tell me what table in SQL this version # is contained in? Thanks ...

Macro Record problem
I am trying to record a macro, but it is not getting recorded properly. How to rectify this? eg. of my recorded macro --------------------------------- Range& VB_VarUserMemIdC4VB_VarUserMemId '+Select While you try to record are you getting an error? OR Do you mean you want to assign the range as a variable as below . Sub Macro() Dim strRange As String strRange = "A1:B10" Range(strRange).Select End Sub -- Jacob (MVP - Excel) "Kash" wrote: > I am trying to record a macro, but it is not getting recorded properly. How > to r...

Can you reset size of bar in scroll bar?
When working in a large Excel worksheet, the size of the scroll bar diminishes to allow you to scroll through the entire sheet. After intentionally deleting a large portion of the worksheet, the bar size on the scroll bar remains the same. Is there a way to reset the size of the bar on the scrollbar? You have to delete the rows (not just clear the contents), and then, the easiest thing is to save the workbook. -- Regards Juan Pablo Gonz�lez "vsholl" <vsholl@discussions.microsoft.com> wrote in message news:C4CF4E91-D282-4FB4-85EC-A19C5343F18A@microsoft.com... > Whe...