Normal Topic Macro path? (Read 986 times)
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Macro path?
Jul 5th, 2006 at 4:10am
Print Post Print Post  
Using Server/Client setup on WIN2000 Server and stations.

Server has structure C:\Public\Sesame\Data where data files are stored, and C:\Sesame\Utilities\Macros where macros are stored

Clients all have mapped Drive G = "Server\C:\Public\Sesame\" so that Data files are in G:\Data

Client working directories are C:\Sesame

Macros in programming are hard coded as @macro("C:\Sesame\Utilities\Macros\macroname.mac")
Macros are stored on Server in C:Sesame\Utilities\Macros.
Macros do not run because it cannot find them on the server..
Copied macros to C:\Sesame\Utilities\Macro folders on local machines, and macros work OK.

Documentation says that Sesame will look for macros on the Server.

Current path is using C:\ which is correct from the Server's view.
Using G: vs. C does not work because G is in \Public\Sesame... folder vs. the root C:\Sesame....
Mapping G to root will not be allowed by SysAdmin.
Macros files need to stay in root structure vs. public for backup purposes.

How should the program hard coding for the macros be?

  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Macro path?
Reply #1 - Jul 5th, 2006 at 12:12pm
Print Post Print Post  
What is the working directory for the server (as opposed to the clients)?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Macro path?
Reply #2 - Jul 5th, 2006 at 3:56pm
Print Post Print Post  
Hello obfusc88,

This is kind of off topic but why is there a G drive? Sesame does not rely on drive mapping in order to be client/server.

-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: Macro path?
Reply #3 - Jul 6th, 2006 at 12:48am
Print Post Print Post  
For Hammer:
Server working directory is C:\Sesame\ the same as all the clients.

For Ray the Reaper:
Drive G is mapped for many reasons including batch files, backups, etc.. 
But it is also used in icon to start Sesame:
C:\Sesame\Program\sesame.exe -client ServerName:200000:200001 G:\Data\FileName.db

Server has C:\Public\Sesame\  (Mapped Drive G:\)
Server has C:\Public\Sesame\Data\  (G:\Data\ = data files location)
Server has C:\Sesame\Program 
Server has C:\Sesame\Utilities\Macros.
All Server/Clients have working directory C:\Sesame\



  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Macro path?
Reply #4 - Jul 6th, 2006 at 2:59pm
Print Post Print Post  
Hello obfusc88,

The filename after sesame.exe is passed to the engine. When you are running Client/Server the engine is the Sesame Server so the filename that you pass to the executable is passed over to the server. Therefore the path has to be relative to the server.

C:\Sesame\Program\sesame.exe -client ServerName:200000:200001 C:\Public\Sesame\Data\FileName.db

If you can I would put the batch files into a different directory, and map that new directory. I would then remove the map to C:\Public\Sesame\ on the server, so that not every person has access to where the DB and DAT files are on the server. If you allow everyone access to the DB and DAT files through a mapped drive then it can cause some problems.

Ex: Server computer is running Sesame Server and Computer A is connected as a Client and has the file "MyApp.db" open. Computer B had Sesame installed at a later date and is not setup Client/Server. Computer B goes to open the application. They don't see it listed. They browse and find it on the G drive. They try to open it and it returns a message saying the file is in use. They look the message up in the book and unlock the file on the G drive. Now they can open it. So they open it and you end up with two separate Sesame processes that do not know about each other changing the same file. Computer A, if they are looking for it, will notice that they can not see the changes that Computer B is making. If they shut down both the Sesame Server and ComputerB then 'MyApp.db" may or may not reopen.

Another thing you may want to consider is to add the -client switch to the Sesame shortcut that is on the Start menu. That way in case they do use that shortcut they are still connected as a client. If you trust your users, then by all means leave the G drive mapped to C:\Public\Sesame\ on the server.

Regarding @Macro()

If you are set up client\server then @macro will load a macro file that resides on the server. If you click Load Macro in Sesame do you see the macros on the Server computer? If you are Client/Server you should. Another way to check if you are Client/Server is to log into server administration. How many tabs do you have? If it is 3 then you are standalone. If it is 5 then you are Client/Server.

You may also want to try your code as @macro("Utilities\Macros\macroname.mac"). It works either way for me here but this gives you another option.

As a side note double check that all your computers are running the same version. I have not seen a version mismatch cause any problems like this but it is always a good thing to check. The current version is 1.1.3, It should only say Version 1.1.3 there should be nothing after that.

-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: Macro path?
Reply #5 - Jul 6th, 2006 at 8:43pm
Print Post Print Post  
Wow!  Thank you Ray the Reaper for all of this info.  i will need to find out how to print this so I can follow it.  I was able to convince the System Admin to let me use C:\Sesame for everything and will not need to use C:\Public\Sesame so eveything will be set up the same way.

I think that all machines have same version 1.1.3 because that is what shows up on titles of windows.  I do have the five tabs and can see 3 of 5 in the Sesame Server windows with multiple users.  And the macros are running but only because i moved copies to all the workstations because that was how i had the macro command written.  I might not be able to work on this for a few days but i will try using @macro("Utilities\Macros\MacroName.mac") in the program.  I will also need to remember to remove the macros from the local machines so I know what is really running.  The hope is that macro files only need to be in one location andnot need to load on every stations.

And if  I understand what you are saying about Drive letter, after we can use C:\Server\Sesame on the server, then I can start Sesame with the database name by using C:\Sesame\Program\sesame.exe -client ServerName:20000:20001 \data\FileName.db because it is now relative position to C:\Sesame on that server machine vs. was relative to \Public\sesmae  before?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Macro path?
Reply #6 - Jul 7th, 2006 at 5:59pm
Print Post Print Post  
Hello obfusc88,

obfusc88 wrote on Jul 6th, 2006 at 8:43pm:
I will also need to remember to remove the macros from the local machines so I know what is really running.  The hope is that macro files only need to be in one location andnot need to load on every stations.
Be sure to remove the macros from the local machines as they only need to be on the Server computer. Remember that the path for @Macro is going to relative to the Sesame Server's Start In Directory.


Quote:
And if  I understand what you are saying about Drive letter, after we can use C:\Server\Sesame on the server, then I can start Sesame with the database name by using C:\Sesame\Program\sesame.exe -client ServerName:20000:20001 \data\FileName.db because it is now relative position to C:\Sesame on that server machine vs. was relative to \Public\sesmae  before?


Just remember the the path is relative to the Sesame Server's Start In Directory. So if the start in is C:\Public\Sesame and the file is in a data folder under that directory then yes you can use "\data\FileName.db" after the -Client argument

-Ray
  

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