Page Index Toggle Pages: 1 [2] 3  Send Topic Send Topic Print Print
Very Hot Topic (More than 25 Replies) #include files (Read 3645 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: #include files
Reply #15 - Jul 13th, 2007 at 3:38pm
Print Post Print Post  
Everything is set as advised, including mapping of an F drive on the server to the server's own C.  I have "C:\Sesame" set as the Start In for all workstations, Sesame Server, and the Sesame client on the server.

I hard card coded the #include statement to #include "F:\Sesame\Includes\sbasic_include.sbas"" and get no SBASIC failures.

However, my lookups and @Inserts fail.  All the db's and .txt files are in the same directory as the app, and none of the lookup statements or @inserts reference a drive or directory, just the filename.  Hard coding them may solve the problem, but that would be a massive undertaking, and it really shouldn't be necessary, right?

Should Sesame Server have a Start In setting of C:\Sesame\Miara ?
  

**
Captain Infinity
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: #include files
Reply #16 - Jul 13th, 2007 at 3:53pm
Print Post Print Post  
What paths are you using for your XLookups? and where are the DB files located(i.e. what directory)?

@Inserts are done on the client side, so they must be pathed from the Client side.

-Ray
  

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


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: #include files
Reply #17 - Jul 13th, 2007 at 3:55pm
Print Post Print Post  
Setting Sesame Server's Start In to C:\Sesame\Miara does not solve the problem  Hard coding a lookup to the exact path\file does.

I have a headache, and it's only Noon.  Usually the throb doesn't set in until 2:30 or so.
  

**
Captain Infinity
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: #include files
Reply #18 - Jul 13th, 2007 at 3:58pm
Print Post Print Post  
If you have the Server's Start in set to C:\Sesame\Miara and in your Xlookups you are simply saying "Driver.db" and Driver.db exists in C:\Sesame\Miara, that should work just fine. You have to be sure that you restart the Sesame Server after changing the Start In.

-Ray
  

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


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: #include files
Reply #19 - Jul 13th, 2007 at 4:06pm
Print Post Print Post  
Yep.  Did all the above.  Sorry, lookups fail, except the hard coded one which works at my workstation but not when Sesame is run as a client on the server.
  

**
Captain Infinity
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: #include files
Reply #20 - Jul 13th, 2007 at 4:10pm
Print Post Print Post  
Quote:
What paths are you using for your XLookups? and where are the DB files located(i.e. what directory)? 

Except for the experimental one where I hard coded a path, no paths are specified for any of my XLookups, as all the db's reside in the same directory as my app.  They all worked just peachy when everything resided on my workstation. (Post Modified - removed statement that turned out not to be true, sorry)
Quote:
@Inserts are done on the client side, so they must be pathed from the Client side.

I'm not sure what you mean.  All my @insert files are also in the same directory as my db's.  Do I need to copy them all to each client?  If so, what directory would I create on the client to hold them?  None of them have hard coded paths in my programming.
  

**
Captain Infinity
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: #include files
Reply #21 - Jul 13th, 2007 at 4:22pm
Print Post Print Post  
Infinity wrote on Jul 13th, 2007 at 4:10pm:
Except for the experimental one where I hard coded a path, no paths are specified for any of my XLookups, as all the db's reside in the same directory as my app.  They all worked just peachy when everything resided on my workstation. (Post Modified - removed statement that turned out not to be true, sorry)


What directory do the DB files reside in? Same directory as your app means nothing to me, I need the path.

Quote:
I'm not sure what you mean.  All my @insert files are also in the same directory as my db's.  Do I need to copy them all to each client?  If so, what directory would I create on the client to hold them?  None of them have hard coded paths in my programming.


Yes copy them to each client and just place them in the C:\Sesame directory.

-Ray
  

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


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: #include files
Reply #22 - Jul 13th, 2007 at 4:42pm
Print Post Print Post  
Quote:
What directory do the DB files reside in? Same directory as your app means nothing to me, I need the path.

Sesame/Miara/

Seen as F:\Sesame\Miara from the workstations and both C:\Sesame\Miara and F:\Sesame\Miara on the server, which now has F mapped to C.

Quote:
Yes copy them to each client and just place them in the C:\Sesame directory.

Sigh.  OK, but it seems like I may as well hard code the contents into the drop down lists (that's what the inserts are being used for).  I liked @Insert because it gave me a single place to edit the contents of the lists without having to edit the app.  Spreading the files out over all my clients defeats that purpose.  But, I'm still looking into making each client's Sesame folder shareable across the network, so what you suggest is workable with some effort, another batch file to update them and, of course, more coffee.
  

**
Captain Infinity
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: #include files
Reply #23 - Jul 13th, 2007 at 5:14pm
Print Post Print Post  
Infinity wrote on Jul 13th, 2007 at 4:42pm:
Sesame/Miara/

Seen as F:\Sesame\Miara from the workstations and both C:\Sesame\Miara and F:\Sesame\Miara on the server, which now has F mapped to C.


hmm then setting the Start In of the Sesame Server to be C:\Sesame\Miara and just referencing the files as "Application.db" should work just fine. The only reason that I can think that it would not work is if the file that is being XLookup'ed is locked. Check that.

Quote:
Sigh.  OK, but it seems like I may as well hard code the contents into the drop down lists (that's what the inserts are being used for).  I liked @Insert because it gave me a single place to edit the contents of the lists without having to edit the app.  Spreading the files out over all my clients defeats that purpose.  But, I'm still looking into making each client's Sesame folder shareable across the network, so what you suggest is workable with some effort, another batch file to update them and, of course, more coffee. 


Or hard code the @Inserts to use the F drive such as  F:\PathToFile\File.txt
That will keep them in a central location.

-Ray
  

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


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: #include files
Reply #24 - Jul 13th, 2007 at 6:06pm
Print Post Print Post  
OK, I'm making progress, baby steps, baby steps.  I moved all my @Insert files onto the directory Sesame\Inserts.  Then, working with just my Workorder form, I programmed a global static variable
Code
Select All
Stat sInsertDir as string = "F:\Sesame\Inserts\" 


I then hard coded all my @Inserts like the following:
Code
Select All
Var vAddlCharges as String
vAddlCharges = @Insert(sInsertDir + "AdditionalCharges.txt")
PopulateListElement(BILLING_ADDITIONAL_CHARGES_DESCRIPTION, vAddlCharges) 



Then I set the Start In properties for the Sesame Server icon to C:\Sesame\Miara.  The Start In for my workstation as well as the icon that starts a client on the server is C:\Sesame.

And this works.  Yay!  All my drop-down lists fill nicely with the contents of my .txt files.  Since moving sbasic_include.sbas to Sesame\Includes and hard coding my #include statements as "#include "F:\Sesame\Includes\sbasic_include.sbas"" I have had no SBASIC errors on that front either.  Cool.

But.  All my lookups still fail.  It's looking like I'll have to hard code those as well, difficult as that will be.  Do you see any alternative?
  

**
Captain Infinity
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: #include files
Reply #25 - Jul 13th, 2007 at 7:06pm
Print Post Print Post  
By the way, in regards the lookup failures, the messages in the server log are all of the nature
Quote:
2007/07/13  02:24:19 PM  server_warning  S_ENG 331020  Failed to open TRAILERS.db


I can open these successfully by themselves; they are not being locked.  One thing to note: when I open MIARA.db and it tries to perform a lookup into, say, Trailers.db, and then I close MIARA.db, MIARA.db disappears from the list of open applications in the server admin window but Trailers.db does not (it appears to stay loaded).  If I do not open MIARA.db but instead just open Trailers.db, do a search, etc, and then close it, it disappears from the window sweet as can be.  I don't know what that means or if it gives any clue to my problem, but I thought I'd mention it.
  

**
Captain Infinity
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: #include files
Reply #26 - Jul 13th, 2007 at 8:21pm
Print Post Print Post  
Hard coding a path to my XLookups works in Preview but not in Runtime (yes, I reconciled).

This is maddening.
  

**
Captain Infinity
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: #include files
Reply #27 - Jul 14th, 2007 at 3:28pm
Print Post Print Post  
I tried using my app with the hard coding on another workstation and got compilation errors.  So I have removed the hard coded paths for my #include and @inserts, and will be putting them into each user's Start In folder (currently C:\Sesame for each client).  Once I did that the program compiled nicely.  The only #include file I am using is sbasic_include.sbas.

However, my lookups still fail in runtime.  Hard-coded lookups work in sdesigner preview, however.  That is, in Preview, this will work:
Code
Select All
IF NOT @ISBLANK(DESCRIPTION_CODE)
THEN
	{
	DESC_LINE_1 = @XLU("F:\Sesame\Miara\Desccode.db", DESCRIPTION_CODE, "DESCCODE!KEY", "ENTRY_1")
	If @Error then writeln("Lookup failed")
	DESC_LINE_3 = @XLU("F:\Sesame\Miara\Desccode.db", DESCRIPTION_CODE, "DESCCODE!KEY", "ENTRY_2")
	DESC_LINE_9 = @XLU("F:\Sesame\Miara\Desccode.db", DESCRIPTION_CODE, "DESCCODE!KEY", "ENTRY_3")
	} 


But this will not:
Code
Select All
IF NOT @ISBLANK(DESCRIPTION_CODE)
THEN
	{
	DESC_LINE_1 = @XLU("Desccode.db", DESCRIPTION_CODE, "DESCCODE!KEY", "ENTRY_1")
	If @Error then writeln("Lookup failed")
	DESC_LINE_3 = @XLU("Desccode.db", DESCRIPTION_CODE, "DESCCODE!KEY", "ENTRY_2")
	DESC_LINE_9 = @XLU("Desccode.db", DESCRIPTION_CODE, "DESCCODE!KEY", "ENTRY_3")
	} 


In spite of the fact that the app making this lookup and the target db both reside in F:\Sesame\Miara\, as seen by my workstation.

Neither of the above work in Runtime.

The only differences in the programs that I can see is that when I start up sdesigner from my workstation, my icon uses the command "C:\Sesame\Program\sdesigner.exe" and when I start Runtime it's "C:\Sesame\Program\sesame.exe -Client Miara-2000serve".  Both have C:\Sesame as a Start In folder.

One other issue I haven't mentioned is that, since migrating my applications to the server, after I reconcile and then try to open my application, the process called "loading" goes very quickly, but then "saving" takes a very long time, upwards of 5 minutes, which is much longer than when it resided on my workstation.  I'm not sure what to make of that.

Since I've been working with a .dsr that came along with the migration to the server, I decided to create a new .dsr using "redesign application" from runtime.  The first two times I tried this it appeared that sdesigner hung, and clicking on the window gave me "this program is not responding".  The third time I decided to wait it out.  It took 10 minutes.

Anyhoo, once I got into the new .dsr, I checked to be sure that the programming was the same as when I was using the old one (it was) and I tried Preview.  This time the hard-coded lookups did not work, nor did (as before) the ones that should just reference the files in the working directory.  So there's clearly a difference in the way sdesigner is seeing my network.  Run from my C drive, sdesigner can see the lookup targets on F.  Run from "redesign this application" it cannot.  In any case, neither db's in hard coded paths nor db's that reside in the same directory as the app are working in Runtime.

Closing my app took 6 minutes.  Saving my new .dsr took 4 minutes.

These things moved like lightning when the files were on my workstation.  It's a Saturday and no one else is here, and mine is the only system attached to the server, so there's no network traffic that might be getting in the way.  As you can imagine, this is all very frustrating, and I'm really at a loss to know what to do next.
  

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


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: #include files
Reply #28 - Jul 14th, 2007 at 5:02pm
Print Post Print Post  
Scott,

It sounds like there is mapped hard drive or some other sort of client/server configuration issue in the mix. Support can probably help get it straightened out.
  

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


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: #include files
Reply #29 - Jul 14th, 2007 at 5:15pm
Print Post Print Post  
I decided to test the copy of my app that I have on my laptop.  These files have never seen a network and I have never used any #include files other than sbasic_include.sbas.

Lookups and @Inserts in Preview work flawlessly.  In Runtime they do not.

These apps worked perfectly up until June 24, the day I installed the programs from the conference disk.

Something is definitely funky, folks, and I'm beginning to suspect it's not me.  Could I have a bad copy of sesame.exe?
  

**
Captain Infinity
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 3 
Send Topic Send Topic Print Print