Normal Topic Problem exporting file info using @SpecCommand (Read 1090 times)
NHUser
Full Member
***
Offline



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Problem exporting file info using @SpecCommand
Nov 15th, 2011 at 10:12pm
Print Post Print Post  
I'm trying to use the programming below.  It seems to work fine when I am in the Preview mode of Designer.  However, when I try to use the same programming from my application, I get an error message that "ASCII Export failed to create the file..."

Any ideas why this is happening?



#include "sbasic_include.sbas"

var vRt as String

/*
Arguments:
filename
custom seperator character
custom delimiter character
tabbed
use custom sep
no sep
ignore fixed
all
none
use custom delim
header
*/

     vRt = @SpecCommand(SPEC_OPERATION_LOAD, SPEC_TYPE_EXPORT, "All Data")
     vRt = @SpecCommand(SPEC_OPERATION_RUN, SPEC_TYPE_EXPORT, "S:\sesame2\data\samples.txt", ",", """", "0", "1", "0", "0", "0", "0", "1", "0") 


  
Back to top
 
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Problem exporting file info using @SpecCommand
Reply #1 - Nov 16th, 2011 at 12:26am
Print Post Print Post  
Just a thought, when you reconciled, did you happen to select "Yes" for "should Reconcile replace the saved specs in the target application?
  
Back to top
IP Logged
 
NHUser
Full Member
***
Offline



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: Problem exporting file info using @SpecCommand
Reply #2 - Nov 16th, 2011 at 2:40pm
Print Post Print Post  
No.  I generally do not set any of the options to "Yes" when I reconcile.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Problem exporting file info using @SpecCommand
Reply #3 - Nov 16th, 2011 at 3:50pm
Print Post Print Post  
NHUser wrote on Nov 16th, 2011 at 2:40pm:
No.  I generally do not set any of the options to "Yes" when I reconcile.

Then, does the db have the All Data export spec?
  

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



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: Problem exporting file info using @SpecCommand
Reply #4 - Nov 16th, 2011 at 4:48pm
Print Post Print Post  
The programming is tied to a command button.  When I click on the button, the All Data spec is loaded, but the file creation does not occur.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Problem exporting file info using @SpecCommand
Reply #5 - Nov 16th, 2011 at 5:06pm
Print Post Print Post  
NHUser wrote on Nov 16th, 2011 at 4:48pm:
The programming is tied to a command button.  When I click on the button, the All Data spec is loaded, but the file creation does not occur.

How do you know that the All Data Spec is being loaded?

Also, your run command looks weird to me. There are 4 quote marks in a row in the middle of it.
  

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



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: Problem exporting file info using @SpecCommand
Reply #6 - Nov 16th, 2011 at 6:49pm
Print Post Print Post  
I know that the All Data saved spec is being loaded because I see the various elements are selected in the menu tree section for Exporting data.

As it is now, I click on the command button, get the error message, close the error message then run the export command using the menu tree function.

The four quote marks are how I was able to create the text in the properly delimited txt file.

The heart of my question is, why does it work in Designer Preview mode but not in the active Sesame mode?
  
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: Problem exporting file info using @SpecCommand
Reply #7 - Nov 16th, 2011 at 6:54pm
Print Post Print Post  
NHUser wrote on Nov 16th, 2011 at 6:49pm:
The heart of my question is, why does it work in Designer Preview mode but not in the active Sesame mode?


Are you perhaps running Sesame in Client/Server and Sesame Designer Standalone?

-Ray
  

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



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: Problem exporting file info using @SpecCommand
Reply #8 - Nov 16th, 2011 at 7:04pm
Print Post Print Post  
Bingo!

Yes, the designer is loaded on my laptop, so it the network isn't involved.  Sesame is run in client/server on the network.

If this is the issue, how do I work around it?
  
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: Problem exporting file info using @SpecCommand
Reply #9 - Nov 16th, 2011 at 7:47pm
Print Post Print Post  
The path specified in @SpecCommand() needs to be relative to the Server, So I am guessing it's not working as the Server itself does not have an S:\ drive. What I would recommend is to use a relative path such as "data\samples.txt" for the path in @SpecCommand() instead of the full path you are using.

-Ray
  

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