Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Trouble with backing up app. using a macro (Read 2856 times)
Leezerd
Member
*
Offline


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Trouble with backing up app. using a macro
May 3rd, 2005 at 2:10pm
Print Post Print Post  
I have an application that uses a command button to trigger a macro that backs up my application before exiting Sesame.  I had to learn the hardway that my macro wasn't doing what it was supposed to.  (Thank god for drive image backups!)  Anyway what I have discovered is that if you backup your application manually sesame asks you if you would like to overwrite the previous backup file.  Ok no problem.  When I record my macro to backup my app. sesame never asks the overwrite question.  And then the backup doesn't happen.  Any suggestions?

Leezerd
  

How can you be in two places at once when you're not anywhere at all.
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: Trouble with backing up app. using a macro
Reply #1 - May 3rd, 2005 at 2:56pm
Print Post Print Post  
Hello Leezerd.

Macro's by nature hide all warnings, but the backup will still work if it is recorded properly.

In your macro are you typing the name of the file to backup to or are you selecting the file from the list?

Could you give me a rundown of the steps that your macro does?

-Ray
  

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


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Re: Trouble with backing up app. using a macro
Reply #2 - May 3rd, 2005 at 4:48pm
Print Post Print Post  
Ray,

I did not type the name of my backup application file.

The whole thing runs like this:

From Add Data mode or Seach Update mode a
command button opens menu tree with this code:

var success as Int

@Save

success = @SelectTreeItem("NewSesameApplication!Application Utilities")

if success = 1 then
     @macro("\\Lee2004\lee's data\My Documents\Sesame\Data\bkupxtbpi.mac")

Macro:
Selects "Back Up Application"
From the "Root Directories" drop down selects "D:"
Then selects "My Documents" folder
Then selects "Sesame" folder
Then selects "Data" folder
Then selects "backupbpinew.db" for the backup file name.
Then clicks on "Accept" button
Then selects "File" from the program menu
Then selects "Exit"

  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Trouble with backing up app. using a macro
Reply #3 - May 4th, 2005 at 2:48am
Print Post Print Post  
Leezerd,

I have been using a command button to backup my applications for quite a while. It is actually doing what it should - I have needed the files at times. (You should check the file dates of the backup files to ensure they are being updated after testing the command button.)

Rather than using success = @SelectTreeItem("NewSesameApplication!Application Utilities") and having the macro select "Backup Application", you can simply use Success = @SelectTreeItem(@Application + "!Application Utilities!Backup Application") instead.

To record the macro, open your application:
1) Select Backup Application from the application utilities menu. (You should now see a window where you select a filename to use. Don't click anything just yet.)
2) Turn macro recording ON by pressing Shift-F2.
3) Click in the Filename text box.
4) Press the End key to make sure the cursor is at the end of the text that is already there.
4a) Press Shift-Home. This will highlight the default entry, so when you type it will be replaced.
5) Type in the filename you want for your backup copy.
5a) Type the entire path and filename. (i.e. "D:\MyDocuments\Sesame\Data\backupbpinew.db")
6) Click on Accept.
6a) Select "File" from the program menu, then select "Exit".
7) Turn macro recording OFF by pressing Shift-F2.

You may want to check out this thread where I originally posted a similar message:
http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=archived;action=display...

Good luck. Let me know how this works for you.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Leezerd
Member
*
Offline


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Re: Trouble with backing up app. using a macro
Reply #4 - May 4th, 2005 at 1:37pm
Print Post Print Post  
Carl-

That seems to work real well.  On my computer.  I have other computers adding info to this database.  They run the app out of one central computer.  How do I get the backup to work from the other terminals.  The path should look something like this:

\\Lee2004\lee's data\My Documents\Sesame\Data\backupbpinew.db

I have tried this path but it doesn't work, not even on the computer that runs the app.  Do I need quotes (" ")for the spaces in the path??
  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Trouble with backing up app. using a macro
Reply #5 - May 4th, 2005 at 1:52pm
Print Post Print Post  
Leezerd,

I'm not sure about sending it to a networked drive.

Maybe you can assign a drive letter to the destination, and use that rather than the computer name format.

I'm sure the Lanticans would know.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Trouble with backing up app. using a macro
Reply #6 - May 4th, 2005 at 2:31pm
Print Post Print Post  
As long as the OS on the server has access to the networked drive, Sesame server won't care. Of course it will take longer having to pump the file through the network to get to the other computer's harddrive. But Sesame doesn't care if you use a drive letter or a netpath.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Leezerd
Member
*
Offline


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Re: Trouble with backing up app. using a macro
Reply #7 - May 5th, 2005 at 11:43am
Print Post Print Post  
Mark-

Any ideas on why that path won't work??  I have tried it a few different ways with no success.  As far as I know the path is correct...
  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Trouble with backing up app. using a macro
Reply #8 - May 5th, 2005 at 11:48am
Print Post Print Post  
Does the path work from the command line using "dir" and the same account you are using to start the Sesame server?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Trouble with backing up app. using a macro
Reply #9 - May 5th, 2005 at 1:48pm
Print Post Print Post  
If the path includes spaces (looks like it does), then you may need to surround it with a pair of quotes?
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Leezerd
Member
*
Offline


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Re: Trouble with backing up app. using a macro
Reply #10 - May 5th, 2005 at 1:59pm
Print Post Print Post  
If I use quotes I get this error message:

The specified path does not have write permission.

If I go without quotes I get this one:

Cannot save to specified path.
  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Trouble with backing up app. using a macro
Reply #11 - May 5th, 2005 at 2:23pm
Print Post Print Post  
Not to be glib, but it looks like you don't have write permission on the specified path. Smiley

This is controlled by the security settings of your operating system.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Leezerd
Member
*
Offline


I wish I had a better
picture than this...

Posts: 49
Joined: Aug 23rd, 2004
Re: Trouble with backing up app. using a macro
Reply #12 - May 5th, 2005 at 4:49pm
Print Post Print Post  
I actually do have the drive shared on our network, and people write to it all the time, that's what makes this so weird.
  

How can you be in two places at once when you're not anywhere at all.
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Trouble with backing up app. using a macro
Reply #13 - May 5th, 2005 at 4:54pm
Print Post Print Post  
Can you write to that path from the command line when logged in as the same account that starts the Sesame server?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Trouble with backing up app. using a macro
Reply #14 - May 5th, 2005 at 11:12pm
Print Post Print Post  
For what it's worth, I am getting exactly the same errors as Leezerd, and I can write to the network locations from other Windows programs. I can also write to the network locations from a DOS window if I put the path in quotes. But I get an error from Sesame telling me that I don't have write permission.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print