Hot Topic (More than 10 Replies) Xlookup issues (Read 1380 times)
awbrewer
Member
*
Offline



Posts: 5
Joined: Jul 23rd, 2009
Xlookup issues
Jul 23rd, 2009 at 7:38pm
Print Post Print Post  
Just a quick disclaimer:  I am an extreme newbie at this and am only programming because the programming from Q&A didn't translate.
I am working with two databases, trying to retrieve records from one using xlookup, but I can't seem to get it to work.  I am trying to retrieve records from a database called jtest, and have them listed in one called htest upon entry of an inventory number in the "inv" field in htest.  I have to do it for a few fields, but in the example I've posted, I'm trying to retrieve the contents of the "jewelry" field from jtest and have it appear in htest upon entry of the inventory number in the "inv" field.  Below is the code I tried.  I entered it under the field inv in htest, OnElementEntry.  I hope this makes sense, and if not, I apologize.  Thanks in advance for the help

Xlookup("C:\Program Files\Sesame\Data\jtest.db", "inv", "jtest!inv", "jewelry", jewelry)
  
Back to top
 
IP Logged
 
Don Haley
Member
*
Offline


No personal text

Posts: 38
Location: Plymouth, Devon, UK
Joined: Jan 23rd, 2004
Re: Xlookup issues
Reply #1 - Jul 23rd, 2009 at 7:47pm
Print Post Print Post  
Remove the "" from "inv" and try that.

Don
  
Back to top
 
IP Logged
 
awbrewer
Member
*
Offline



Posts: 5
Joined: Jul 23rd, 2009
Re: Xlookup issues
Reply #2 - Jul 23rd, 2009 at 7:50pm
Print Post Print Post  
Unfortunately, that didn't work.  Thanks for giving it a try.  Is there any more info I could give that would be helpful?
  
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 issues
Reply #3 - Jul 23rd, 2009 at 7:56pm
Print Post Print Post  
awbrewer wrote on Jul 23rd, 2009 at 7:38pm:
Below is the code I tried.  I entered it under the field inv in htest, OnElementEntry.  I


Try moving the Code to the On Element Change event of the Inv Element in HTest.

Does JTest have Security on it?
Is there more than one form in JTest?
  

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



Posts: 5
Joined: Jul 23rd, 2009
Re: Xlookup issues
Reply #4 - Jul 23rd, 2009 at 8:00pm
Print Post Print Post  
That didn't seem to work either, but thanks for giving it a shot

There is only one form in jtest, and as for security there is just a username and password
  
Back to top
 
IP Logged
 
Don Haley
Member
*
Offline


No personal text

Posts: 38
Location: Plymouth, Devon, UK
Joined: Jan 23rd, 2004
Re: Xlookup issues
Reply #5 - Jul 23rd, 2009 at 8:00pm
Print Post Print Post  
Check your path. mine is Sesame2 not Sesame.
  
Back to top
 
IP Logged
 
awbrewer
Member
*
Offline



Posts: 5
Joined: Jul 23rd, 2009
Re: Xlookup issues
Reply #6 - Jul 23rd, 2009 at 8:07pm
Print Post Print Post  
My folder is just Sesame, but thanks.  I appreciate any guesses, I'm pretty stumped.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Xlookup issues
Reply #7 - Jul 23rd, 2009 at 8:12pm
Print Post Print Post  
awbrewer wrote on Jul 23rd, 2009 at 8:00pm:
That didn't seem to work either, but thanks for giving it a shot

There is only one form in jtest, and as for security there is just a username and password


If there is security you will need to set the XLookup user/password in the application doing the invocation for a user that has access to the application specified in the XLookup.

Also, you should try to use @XLookup instead of XLookup, allowing you to check the returned value before it gets set to a field.

What problem did you have converting? QABasic usually produces quite a few warnings as it translates. Did you get any errors in the log?
  

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



Posts: 5
Joined: Jul 23rd, 2009
Re: Xlookup issues
Reply #8 - Jul 23rd, 2009 at 8:23pm
Print Post Print Post  
I temporarily disabled security on both forms, but it still didn't work.
I didn't use @Xlookup for two reasons: it gave me an error message when testing the code and xlookup didn't, and the main user of this database (not me) wants it as close to the old Q&A as possible, so I didn't want to add an extra step

A lot of the translation errors were items entered in fields with the wrong formatting (text in a field that only accepts numbers, etc.), and when I opened the forms up for the first time, I got a popup saying that the programming didn't translate and wouldn't work, so that's why I've been trying to reprogram it.  The code was still there from the old Q&A, but for some reason wasn't working.  I've gotten most of the other simpler functions to work again (simple math, @number, date), but accessing other forms has been beyond me.

Thanks again for your help
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Xlookup issues
Reply #9 - Jul 23rd, 2009 at 8:41pm
Print Post Print Post  
Is @error set? If so what does @ErrorType return?

Which version of Sesame are you using?

If you have set the security password in the sending app and are still getting an error, then there is something wrong in your argument set or in the file permissions or locking of the target app.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Xlookup issues
Reply #10 - Jul 24th, 2009 at 2:20pm
Print Post Print Post  
X-command problems like this are almost always one of two things:
1. One of your names is spelled wrong or you need to include the form name
2. You are not passing the right security info

Unfortunately, it's hard to help you by guessing at how something might be spelled. Your best bet is probably to send the database(s) in to Support at support@lantica.com or get on a remote session with them, so they can see exactly what things are named. Once we're not working blind, we can probably get your XLookup in order in a few minutes.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged