Normal Topic Autoloading databases (Read 7360 times)
cbislander
Full Member
***
Offline



Posts: 103
Joined: Mar 22nd, 2018
Autoloading databases
May 17th, 2021 at 7:49pm
Print Post Print Post  
I am working on automatically loading databases using a batch file.  The ones below do not have passwords.  Another database that I use does require a USER ID and password. 

C:
cd\Sesame2
cd Program
sesame.exe -client SesameServer Data\ANT\SOLDANT.db
sesame.exe -client SesameServer Data\NG\SOLDNG.db 
sesame.exe -client SesameServer Data\SM\SOLDSM.db
sesame.exe -client SesameServer Data\SR\SOLDSR.db

How do I set up that to autoload?
  
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: Autoloading databases
Reply #1 - May 18th, 2021 at 1:47pm
Print Post Print Post  
I would recommend making a 5th application that has the XUserName and XPassword set on it and in the On Application Open event, Do a simple XLookup to each of those 4 applications.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
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: Autoloading databases
Reply #2 - May 19th, 2021 at 2:07pm
Print Post Print Post  
You can not automate the logging in of an application.
  

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: Autoloading databases
Reply #3 - Jul 21st, 2021 at 12:49pm
Print Post Print Post  
Hi Ray,

I made a database Manager.db which calls up reports from other databases based on the entered parameters. 

At the day end, our main database I-2021v2.db and each location's Sold databases imports the text files from each location when they are opened.  I have a password setup on the main database to avoid accidental deletes. The Mass Updates in each database is done by a Command Button command.

Can the Imports and Mass Updates be done from the Manager database like doing the reports and if so, what commands do I use?
  
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: Autoloading databases
Reply #4 - Jul 22nd, 2021 at 1:41pm
Print Post Print Post  
There is no way to run Imports or Mass Update specs on an external database. You could achieve similar results using the XResultSet family of commands to put values in(Import) and modify values(Mass Update) but you would have to handle parsing of the file, creation of records, etc. etc.

-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: Autoloading databases
Reply #5 - Jul 22nd, 2021 at 6:42pm
Print Post Print Post  
Hi Ray,

Below is the programming for the DELIVERED button.

Is there a way to integrate in the start up instead of needing to press the command button after the files are imported.


var vTmp1 as Int
var vTmp2 as Int
var vList as String
var vChoice as Int

var vTmp as Int
var vChoice1 as String
vChoice1 = "PENDING"

     If @Mode() = 1
     {
           vTmp = @SelectTreeItem("Search Update Menu!Search (F7)")
     }
     If @Mode() = 2
     {
           //vList = @SpecCommand(6, 1, "")
           //vList = "Current Spec;" + vList
           //PopupSelectPosition(4, @XPos(ThisElement), @YPos(ThisElement))
           //vChoice = @PopupMenu(vList, "SELECT A SPEC")
           If vChoice1 <> ""
           {
                 If vChoice1 <> "Current Spec"
                 {
                       vList = @SpecCommand(0, 1, vChoice1)
                 }
                 vList = @SpecCommand(2, 1, vChoice1)
           }
     }
                     
vTmp1 = @LoadMassUpdateSpec("DELCMP-LKUP")

If vTmp1 = 1  Then RunMassUpdateSpec()

vTmp2 = @LoadRetrieveSpec("DELIVERED")
@save

If @Mode() = 2 Then vlist = @SpecCommand(2, 1, "DELIVERED")
@save
                     
vTmp1 = @LoadMassUpdateSpec("UNPOSTTOSRSOLD")

If vTmp1 = 1  Then RunMassUpdateSpec()

CreateAProcess("C:\Sesame2\DELANT.BAT")
ExitSesame()

  
Back to top
 
IP Logged