Normal Topic Semi-Automatic updates (Read 1431 times)
cbislander
Full Member
***
Offline



Posts: 103
Joined: Mar 22nd, 2018
Semi-Automatic updates
May 16th, 2023 at 1:20pm
Print Post Print Post  
We have 4 locations that product is sold and delivered from.  Keeping track of the items sold is simple enough.
I have a separate database for each location's delivered items.
At the end of the day, they are updated so we know what is delivered and what is still pending.

The challenge is to merge the information so we can prioritize based on date.

I made a form in our Inventory database that all stores get:  SOLD ALL STORES. The 4 separate databases SOLDSR SOLDSM SOLDANT SOLDNG post to the SOLD ALL STORES form.

What I need to do is setup that the records for each location are  deleted before the day end up.

Here is the basic information:

Database:  INVENT.DB
FORM: SOLD ALL STORES
RETRIEVE SPECS: SR SM AN NG

I currently have a Command Button that Checks for Delivered items and updates the Sold databases for each store.

Is there a quick command that I can insert to Search the SOLD ALL STORES form and remove the records?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Semi-Automatic updates
Reply #1 - May 16th, 2023 at 1:41pm
Print Post Print Post  
You can use @XResultSetSearch() and then XResultSetDeleteRecord().

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
cbislander
Full Member
***
Offline



Posts: 103
Joined: Mar 22nd, 2018
Re: Semi-Automatic updates
Reply #2 - May 16th, 2023 at 1:49pm
Print Post Print Post  
Hi Ray,

I'll give it a try.  I wasn't sure if the XResult Delete would work in this case.
  
Back to top
 
IP Logged
 
cbislander
Full Member
***
Offline



Posts: 103
Joined: Mar 22nd, 2018
Re: Semi-Automatic updates
Reply #3 - May 16th, 2023 at 3:56pm
Print Post Print Post  
Ray,

I am trying use this in a Mass Update. 

var vRSHandle as int
var vLoop as int
var vTest1 as string
var vTest2 as string
vTest1 = "\="
vTest2 = "!AN=" + vTest1

vRSHandle = @XResultSetSearch("DATA\INVENT.db", "SOLD ALL STORES", SEARCH_MODE_AND, SEARCH_SYNTAX_QA, vTest2)
If (vRSHandle > -1)
{

XResultSetClose(vRSHandle)
}
It gives me an Error at "SEARCH_MODE_AND".
Will I have to do it another way?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Semi-Automatic updates
Reply #4 - May 17th, 2023 at 1:11pm
Print Post Print Post  
You're getting that error message because you're not including sbasic_include.sbas so Sesame doesn't know what SEARCH_MODE_AND means.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged