Normal Topic XLookup to Q&A 5.0 DTF (Read 609 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
XLookup to Q&A 5.0 DTF
Jan 10th, 2006 at 7:23pm
Print Post Print Post  
Manual page 79 says lookups to Q&A 5.0 DTF files is possible, but I'm having trouble crafting a programming statement that works.  This is what I have:

My Sesame database is Employee.db with a single form, Employee.  It has a le SS which contains a Social Security Number, and a le License which is currently empty.  Both are formatted as text.

My external database is located in the same folder as Employee.db.   It is DRIVERS.DTF.  It contains a field named SS and a field named LICENSE.

I'm trying to have Sesame look up a record based on matching Social Security Numbers, retreive the license info from LICENSE and place it in License.

The XLookup statement as it stands (not working):

Code
Select All
Xlookup("drivers.dtf",SS,"SS","LICENSE",License) 



This has been placed in License's "on-element-entry" section.

I'm probably overlooking some kind of protocol.  Help would be appreciated.
  

**
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: XLookup to Q&A 5.0 DTF
Reply #1 - Jan 10th, 2006 at 7:35pm
Print Post Print Post  
Is drivers.dtf in your current working directory? If not, you need to give the path. i.e. "c:\qa5\data\drivers.dtf"
  

- 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: XLookup to Q&A 5.0 DTF
Reply #2 - Jan 10th, 2006 at 7:39pm
Print Post Print Post  
It is, but I'll hard code the path anyway and try again.  Thanks.
  

**
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: XLookup to Q&A 5.0 DTF
Reply #3 - Jan 10th, 2006 at 7:42pm
Print Post Print Post  
Could the fact that my Q&A dabase uses a field template (XXX-XX-XXXX) for the Social Security Number be having an effect?  I made sure before beginning that both databases have hyphenated text in the SS fields.  Should I remove the template?
  

**
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: XLookup to Q&A 5.0 DTF
Reply #4 - Jan 10th, 2006 at 7:50pm
Print Post Print Post  
I solved it; it was the template.  Although Q&Awas displaying the dashes it was not storing them, so Sesame could find no match.  I removed the dashed from both databases and the lookup works.  I'll use a mass update to put them back in later.
  

**
Captain Infinity
Back to top
IP Logged