Normal Topic Error Starting Database in a batch file (Read 6149 times)
cbislander
Full Member
***
Offline



Posts: 103
Joined: Mar 22nd, 2018
Error Starting Database in a batch file
Feb 10th, 2022 at 8:08pm
Print Post Print Post  
At the end of the day, I use a batch file to import files from my other locations and this location.  It has worked fine, until recently.

If there is a text file for the database, Sesame will import the file and delete it.

Below is a part of the batch file.

c:
cd\sesame2
cd program

sesame.exe -client SesameServer DATA\SR\SOLDSR.DB

sesame.exe -client SesameServer DATA\NG\SOLDNG.DB

sesame.exe -client SesameServer DATA\ANT\SOLDANT.DB

sesame.exe -client SesameServer DATA\SM\SOLDSM.DB

The problem I have now is when I start the SOLDSR database, I get the error shown in the attachment.  When I open the database manually, it works fine.  I tested the programming for errors and none came up.
  

SESAME-ERROR-PIC.png ( 10 KB | 45 Downloads )
SESAME-ERROR-PIC.png
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: Error Starting Database in a batch file
Reply #1 - Feb 11th, 2022 at 2:32pm
Print Post Print Post  
Hello,

You want your batch file to be

Code
Select All
c:
cd\sesame2

program\sesame.exe -client SesameServer DATA\SR\SOLDSR.DB

etc.
 



This way the working directory of the Sesame client is the C:\Sesame2 folder and it can find the include files.

-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: Error Starting Database in a batch file
Reply #2 - Feb 11th, 2022 at 3:23pm
Print Post Print Post  
Hi Ray,

Would that apply to all lines that had "cd program" them?

This  is the complete batch file below.

c:
cd\Sesame2
cd Program
sesame.exe -command SesameServer  hello UNLOAD "ACCOUNTS NG"
sesame.exe -command SesameServer  hello UNLOAD "ACCOUNTS SM"
sesame.exe -command SesameServer  hello UNLOAD "ACCOUNTS ANT"
sesame.exe -command SesameServer  hello UNLOAD "ACCOUNTS SR"
sesame.exe -command SesameServer  hello UNLOAD "ACCOUNTS SR"

X:
CD\ANT
COPY Z:\BACKUP\ANT\ANT1.txt T:\ANT\ANT1.TXT
COPY Z:\BACKUP\ANT\ANT1.txt z:\BACKUP\SM\ANT1.TXT
COPY Z:\BACKUP\ANT\SOLDANT.txt T:\SOLDANT.TXT


CD\NG
COPY Z:\BACKUP\NG\NG1.txt T:\NG\NG1.TXT
COPY Z:\BACKUP\NG\NG1.txt z:\BACKUP\SM\NG1.TXT
COPY Z:\BACKUP\NG\SOLDNG.txt T:\SOLDNG.TXT

CD\SM
COPY Z:\BACKUP\SM\SM1.txt T:\SM\SM1.TXT
COPY Z:\BACKUP\SM\SOLDSM.txt T:\SOLDSM.TXT

T:
CD\SR
COPY T:\BACKUP\SOLDSR.TXT T:\SOLDSR.TXT
COPY T:\BACKUP\SR1.TXT T:\SR\SR1.TXT
DEL T:\BACKUP\SR1.txt
DEL T:\BACKUP\SOLDSR.txt
COPY T:\SR\SR1SM.TXT z:\BACKUP\SM\SR1.TXT
COPY T:\LAYSRBK1.DB T:\SR\LAYSR.DB
COPY T:\LAYSRBK1.DAT  T:\SR\LAYSR.DAT
T:
COPY Z:\BACKUP\SM\LAYSM.* T:\SM
COPY Z:\BACKUP\ANT\LAYANT.* T:\ANT
COPY Z:\BACKUP\SM\DELIVERYSM.* T:\SM
COPY Z:\BACKUP\ANT\DELIVERYAN.* T:\ANT
COPY Z:\BACKUP\NG\DELIVERYNG.* T:\NG
COPY Z:\BACKUP\NG\LAYNG.* T:\NG

T:
CD\ANT
DEL Z:\BACKUP\ANT\ANT1.txt
DEL Z:\BACKUP\ANT\SOLDANT.txt
CD\NG
DEL Z:\BACKUP\NG\NG1.txt
DEL Z:\BACKUP\NG\SOLDNG.txt
CD\SM
DEL Z:\BACKUP\SM\SM1.txt
DEL Z:\BACKUP\SM\SOLDSM.txt

T:
CD\SR
DEL T:\BACKUP\SR1SM.TXT

c:
cd\Sesame2\Utilities\Lantica
sunlock T:\SR\LAYSR.DB
sunlock T:\SM\LAYSM.DB
sunlock T:\ANT\LAYANT.DB
sunlock T:\SM\DELIVERYSM.DB
sunlock T:\NG\DELIVERYNG.DB
sunlock T:\ANT\DELIVERYAN.DB
sunlock T:\NG\LAYNG.DB

c:
cd\sesame2

program\sesame.exe -client SesameServer DATA\SR\SOLDSR.DB

program\sesame.exe -client SesameServer DATA\NG\SOLDNG.DB

program\sesame.exe -client SesameServer DATA\ANT\SOLDANT.DB

program\sesame.exe -client SesameServer DATA\SM\SOLDSM.DB

C:
cd\Sesame2
cd Program
sesame.exe -command SesameServer  hello UNLOAD "SOLD NG"
sesame.exe -command SesameServer  hello UNLOAD "SOLD SM"
sesame.exe -command SesameServer  hello UNLOAD "SOLD ANT"
sesame.exe -command SesameServer  hello UNLOAD "SOLD SR"


EXIT









  
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: Error Starting Database in a batch file
Reply #3 - Feb 11th, 2022 at 3:31pm
Print Post Print Post  
It doesn't really matter for the COMMAND lines as the only thing they would use the Working Directory for would be writing to the Sesame log file.

-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: Error Starting Database in a batch file
Reply #4 - Feb 11th, 2022 at 3:57pm
Print Post Print Post  
Thanks Ray,

I'll see how it goes today.
  
Back to top
 
IP Logged
 
Renato Piacenti
Member
*
Offline


No personal text

Posts: 48
Location: Manaus - Amazonas - Brazil
Joined: Jun 20th, 2005
Re: Error Starting Database in a batch file
Reply #5 - Feb 11th, 2022 at 8:38pm
Print Post Print Post  
SesameServer is the name of the machine where the .DB files are?
If there is a text file for the database, Sesame will import the file and delete it.

Below is a part of the batch file.

c:
cd\sesame2
cd program

sesame.exe -client SesameServer DATA\SR\SOLDSR.DB

sesame.exe -client SesameServer DATA\NG\SOLDNG.DB

sesame.exe -client SesameServer DATA\ANT\SOLDANT.DB

sesame.exe -client SesameServer DATA\SM\SOLDSM.DB

The problem I have now is when I start the SOLDSR database, I get the error shown in the attachment.  When I open the database manually, it works fine.  I tested the programming for errors and none came up. [/quote]
  

Renato Piacenti&&Manaus Amazonas Brazil&&Aqui a Floresta esta sendo preservada.&&Preserve a sua tamb�m.
Back to top
 
IP Logged
 
Renato Piacenti
Member
*
Offline


No personal text

Posts: 48
Location: Manaus - Amazonas - Brazil
Joined: Jun 20th, 2005
Re: Error Starting Database in a batch file
Reply #6 - Feb 11th, 2022 at 8:39pm
Print Post Print Post  
SesameServer is the name of the machine where the .DB files are?
  

Renato Piacenti&&Manaus Amazonas Brazil&&Aqui a Floresta esta sendo preservada.&&Preserve a sua tamb�m.
Back to top
 
IP Logged
 
cbislander
Full Member
***
Offline



Posts: 103
Joined: Mar 22nd, 2018
Re: Error Starting Database in a batch file
Reply #7 - Feb 14th, 2022 at 7:21pm
Print Post Print Post  
Yes,

Ray's suggestion solved the problem.
  
Back to top
 
IP Logged