Hot Topic (More than 10 Replies) @XLookup to an External Application (Read 1514 times)
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
@XLookup to an External Application
Oct 20th, 2005 at 2:27pm
Print Post Print Post  
I am having some trouble with the following statement:

GL DESC = @XLookup("GLCOA.DB", GL ACCOUNT, "GLCOA!GL ACCOUNT", "GL DESC")      

The programming is attached to an element called GL DESC, on element entry,  in my Vendors app.  It is trying to retrieve this value from the GLCOA app based on a match of GL ACCOUNT in both apps.  The elements above have the same element names and type.

When I click on the GL DESC in Vendors, nothing happens.  However, I noticed that it has kept the GLCOA app open behind the scenes as I tried to reconcile this app and can't because it indicates it is open.  I am the only user of this app currently.

Both apps are in the same directory on the same server session in C:\Sesame\Accounting.

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: @XLookup to an External Application
Reply #1 - Oct 20th, 2005 at 4:47pm
Print Post Print Post  
Try this:
GL DESC = @xlookup("GLCOA.DB", GL ACCOUNT, ("GLCOA!GL ACCOUNT"), "GL DESC")
  
Back to top
 
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @XLookup to an External Application
Reply #2 - Oct 20th, 2005 at 5:33pm
Print Post Print Post  
No luck.  Thanks for the input anyway.

Louis
  

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


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @XLookup to an External Application
Reply #3 - Oct 20th, 2005 at 5:34pm
Print Post Print Post  
Louis,

Are you in Preview mode? X-commands don't work in Preview.

If not, are you running client-server?
  

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


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @XLookup to an External Application
Reply #4 - Oct 20th, 2005 at 5:47pm
Print Post Print Post  
Erika:

I remembered in the programming course that they do not work in preview mode and have reconciled application with the programming.

We are running client server.  Is this relevant to describing the path of GLCOA ?

Thanks,

Louis

  

Louis Galvao
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: @XLookup to an External Application
Reply #5 - Oct 20th, 2005 at 6:10pm
Print Post Print Post  
Hello Louis,

Does the GLCOA application have security?

If Yes, did you set the X Username and Password to be a valid login for that application.


Try this code
Code
Select All
Writeln(@XListValues("GLCOA.DB", "GLCOA!GL ACCOUNT")) 


does anything get written out to the WriteLN window

If not then check the path to the DB, that the name of the form is named 'GLOCA', and that there is an element on that form named 'GL ACCOUNT'.

-Ray
  

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


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @XLookup to an External Application
Reply #6 - Oct 20th, 2005 at 7:34pm
Print Post Print Post  
Ray:

I updated the Xuser in both of the databases and it worked. 

I wasn't aware of what this did in the security manager even though I did notice it before.

The write Ln now displays the results and the Xlookup works fine !

Thanks again,

Louis

P.S.  I should attend that designing Sesame course !
  

Louis Galvao
Back to top
 
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @XLookup to an External Application
Reply #7 - Oct 20th, 2005 at 7:38pm
Print Post Print Post  
Ray:

I still have a problem in that it is leaving the GLCOA application open.  I know this from trying to reconcile this application as it indicates that it is open.

Checking the server admin does not reflect it being open but on the server session, it clearly indicates the app is open.

Do you know why this is ?

Thanks,

Louis
  

Louis Galvao
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: @XLookup to an External Application
Reply #8 - Oct 20th, 2005 at 8:01pm
Print Post Print Post  
Hello Louis,

Any application that gets loaded by an X commands stays loaded, so that future X commands do not have to reload it.

In order to reconcile you need to shut down the Sesame Server.

Server admin, on the client, is not going to reflect it being open as there is no way for it to reflect that it is open. The already being served error is going to be written to the server log.

Whatever you do, Do not unlock any DB file that is shown as loaded on the Sesame Server. Unless you want to risk permanently destroying your DB and DAT files.

-Ray
  

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


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @XLookup to an External Application
Reply #9 - Oct 20th, 2005 at 8:29pm
Print Post Print Post  
Ray:

Thanks for the info.

Do you not see this as a problem ?  For example, once I complete our clients application, various ones will need to run Xlookups on this important app on a regular basis.  Is this not a risk to have it open all the time  ? Is it still able to compact and repair properly ?

Also, will XLookup work when the external database is on a different server session ? I haven't tried this yet.

Louis

  

Louis Galvao
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @XLookup to an External Application
Reply #10 - Oct 21st, 2005 at 1:20pm
Print Post Print Post  
Quote:
Ray:

Thanks for the info.

Do you not see this as a problem ?  For example, once I complete our clients application, various ones will need to run Xlookups on this important app on a regular basis.  Is this not a risk to have it open all the time  ? Is it still able to compact and repair properly ?

Sesame does not leave files "open". It only opens files while loading and while writing. Because writing is typically very brief, that leaves only a very small susceptability to "write failure" - those cases where an open file is left incomplete due to sudden OS or hardware failure. An open file is (in Windows) left, to some degree, "cached" in RAM. There may be a lengthy period between a write operation and the "flushing" of the cache - if a file is left open. Sesame keeps all of its files closed except while in direct operation on them.

Sesame "compacts" and repairs when the file is loaded, not during operation. That is why your files grow, rather than shrink when you delete records - until the next time you load the file.
Quote:
Also, will XLookup work when the external database is on a different server session ? I haven't tried this yet.

Louis

Yes. But there is an issue that has been addressed in 1.1.3 (soon to be released). You can have two servers. Call them serverA and serverB. If the application "Customers" is loaded on serverA and a client on serverB does an XLookup on that application - it will load on serverB as well as serverA. In that XLookup is a "read only" type operation, that is okay. But because it is now loaded on serverB, a client also on serverB could then open "Customers" and run it without regard for the lock established by serverA. This is problematic. But, as I said, it is resolved in the next release.
  

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


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @XLookup to an External Application
Reply #11 - Oct 21st, 2005 at 1:47pm
Print Post Print Post  
Mark:

Thanks for the clarification on both issues.

The multiple server sessions you helped me set up are running very well and the Xlookup will definitely be an issue down the road with the multiple servers.

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @XLookup to an External Application
Reply #12 - Oct 21st, 2005 at 2:12pm
Print Post Print Post  
Quote:
Mark:

Thanks for the clarification on both issues.

The multiple server sessions you helped me set up are running very well and the Xlookup will definitely be an issue down the road with the multiple servers.

Louis


As long as you upgrade to 1.1.3, it shouldn't be an issue - even with multiple servers.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged