Normal Topic Export file not created live, but OK in designer. (Read 721 times)
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Export file not created live, but OK in designer.
Nov 20th, 2017 at 5:36pm
Print Post Print Post  
Using Sesame 2.6, Server Client, ports 20003 and 20004.
Code
Select All
C:\Sesame2\Program\sesame.exe -client ServerName :20003 : 20004  Data\MyTestFile.db 


Routine creates Export file in C:\Sesame2\SesameExports\ folder.  This works good in Designer.  The routine continues to import the exported file.  Works good.

But when trying to run in Database Manager, the import did not work.  Trouble shooting found the export file was not created.  Added a WriteLn to help and now see an error message:
Code
Select All
"ASCII Export failed to create file C:\Sesame2\SesameExports\RentalInvoice_34937_171120_1200.txt" 

Sure enough, there is not export file there.  But I can still see the one created in the Designer.

The only thing I can think of that is different is that the Database Manager connects to the Sesame database, on Server, Drive S using the ports, but the Designer does not use the ports, it connects directly.

So I tried to run Sesame directly from the \Program folder, and open the database on the Server.  Sesame opens OK, but clicking on Open does not allow me to see the Server.  The sesame.ini file in C:\Sesame2 does have mapping for the folders:
Code
Select All
Data
Data\Samples
C:\Sesame2
S:
.
[DRIVES] 



Permissions for the C:\Sesame2\ folder has full permissions for everyone (and works in Designer) 

Want the export files to be on the local machine in case there are multiple users doing exports at same time.

I suspect this is some type of network communication problem at this point.  I am 200 miles away with Remote Connection to client, tough to troubleshoot routers, etc.

So, I am wondering what the cause could be, and what the solution might be for this?
  
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: Export file not created live, but OK in designer.
Reply #1 - Nov 20th, 2017 at 5:44pm
Print Post Print Post  
In Client/Server the Export and Import dialogs are both relative to the Server machine.

In standalone those same dialogs are relative to the local machine.

So in Client/Server, the C:\Sesame2\SesameExports\ would need to exist on the Server computer and the user account that is running Sesame Server needs to have Read/Write/Create permissions to that directory.

-Ray
  

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


No personal text

Posts: 194
Joined: Dec 17th, 2005
Re: Export file not created live, but OK in designer.
Reply #2 - Nov 20th, 2017 at 7:04pm
Print Post Print Post  
Thanks for explanation, Ray.   To help me be more clear about this,  a few more questions.....

So, even though drive C is hard coded in the path, I need to send the exports to the Server drive S?   

Could I map a local drive to a drive letter on the server, and export to that drive?   ie: Drive G would be mapped on server to local pc\drive c? Then export to drive G?

Option 2, can I export to server then FileCopy to local drive for later import?

Hmmm, you said Export AND import will be looking on server so even if I copied to local drive Import would not find it?

Also how can I get local sesame to see Server Drive S on File Open?   S is a local mapping to the server?  If I open Sesame.exe from folder vs.  Icon with ports, I still cannot access files on server, even though the drives are in rootsdir file. Permissions are good.
  
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: Export file not created live, but OK in designer.
Reply #3 - Nov 20th, 2017 at 7:22pm
Print Post Print Post  
obfusc88 wrote on Nov 20th, 2017 at 7:04pm:
Thanks for explanation, Ray.   To help me be more clear about this,  a few more questions.....

So, even though drive C is hard coded in the path, I need to send the exports to the Server drive S? 


In the RunExportSpec() command, the path is relative to the server computer. So C:\ will be the Server's C Drive.

Quote:
Could I map a local drive to a drive letter on the server, and export to that drive?   ie: Drive G would be mapped on server to local pc\drive c? Then export to drive G?


You could but if you have multiple clients you would have to have multiple shares on the server back to each client which would be a headache to maintain.

Quote:
Option 2, can I export to server then FileCopy to local drive for later import?


You could but again the path for RunImportSpec() is also relative to the Sesame Server. No need to copy the file to the local system unless you are using @Insert() or File...() commands(Read, Open, etc)

Quote:
Hmmm, you said Export AND import will be looking on server so even if I copied to local drive Import would not find it?


Yes. Import and Export are both relative to the Sesame Server. Import will not find files on the local system.

Quote:
Also how can I get local sesame to see Server Drive S on File Open?   S is a local mapping to the server?  If I open Sesame.exe from folder vs.  Icon with ports, I still cannot access files on server, even though the drives are in rootsdir file. Permissions are good.


If you are launching Sesame by just clicking on the exe, then Sesame's working directory will be C:\Sesame2\Program which is where Sesame will expect to find it's rootdirs.ini file. It's not there. This is why the Sesame Icons have the start in set to C:\Sesame2. That sets the working directory for Sesame so that the rootdirs and sesame INI files can be loaded from C:\Sesame2.

From the outside looking in it looks as if your export routine uses a unique name with a unique identifier from the record for the export so there is no reason to need to worry about multiple client issues. As two clients can't export the same record at the same time due to record locking. I suspect all you need to do is create the C:\Sesame2\SesameExports directory on the server computer and be sure that the user account running Sesame Server has Write/Create access to it.

-Ray
  

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