Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) How do I xlookup a Q&A dtf database? (Read 6181 times)
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
How do I xlookup a Q&A dtf database?
Aug 15th, 2004 at 7:52pm
Print Post Print Post  
I'm using the below program but not having any luck and I cant find any documentation on dtf lookups anywhere.

vstring = @xlookupsourcelistall("C:\Q&A\Inventory.dtf", Stock Number, "Stock #", "Invoice date;Sold by")

where:

Stock number is LE in sesame that contains a matching number to lookup in Q&A

Stock # is the field name in Q&A

Invoice date and Sold By are fields in Q&A containing the data I want to lookup.

I suspect I'm entering the path and filename wrong. Any thoughts?

Thanks,
Steve
  
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How do I xlookup a Q&A dtf database?
Reply #1 - Aug 15th, 2004 at 9:13pm
Print Post Print Post  
The server log gives this error:

"incorrect version or format".

I'm using q&A version 5.0 (DOS)

Thanks,
Steve
  
Back to top
IP Logged
 
pineberry
Full Member
***
Offline


No personal text

Posts: 115
Location: Strawberry, AZ  USA
Joined: Nov 30th, 2002
Re: How do I xlookup a Q&A dtf database?
Reply #2 - Aug 15th, 2004 at 9:16pm
Print Post Print Post  
does your @xlu work if you only have one source element eg "invoice date" ?
  
Back to top
 
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How do I xlookup a Q&A dtf database?
Reply #3 - Aug 15th, 2004 at 9:24pm
Print Post Print Post  
The server log gives this error:

"incorrect version or format".

I'm using q&A version 5.0 (DOS)

Thanks,
Steve
  
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How do I xlookup a Q&A dtf database?
Reply #4 - Aug 15th, 2004 at 9:31pm
Print Post Print Post  
Uhoh. Now I'm getting an error message inQ&A saying "This is not a q&a database.".

I wasn't getting this error before i tried the xlookups.


I give up.

Steve
  
Back to top
IP Logged
 
pineberry
Full Member
***
Offline


No personal text

Posts: 115
Location: Strawberry, AZ  USA
Joined: Nov 30th, 2002
Re: How do I xlookup a Q&A dtf database?
Reply #5 - Aug 15th, 2004 at 10:15pm
Print Post Print Post  
The following works with QA DOS 4.0

vnum=@xlu(F:\qatest\stk5.dtf",item,"stk#",list)

  
Back to top
 
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How do I xlookup a Q&A dtf database?
Reply #6 - Aug 15th, 2004 at 11:28pm
Print Post Print Post  
Pineberry,

Thanks for the suggestions, but still no luck. Only @error is being returned.

However, Using the @xlookup versus xlookupsourcelistall is not 'corrupting' my Q&A database.

Steve
  
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: How do I xlookup a Q&A dtf database?
Reply #7 - Aug 16th, 2004 at 12:01am
Print Post Print Post  
I think that there might be a typo here?
Quote:
vnum=@xlu(F:\qatest\stk5.dtf",item,"stk#",list)
could not work.  Looks like a missing double quote at beginning, like:
vnum=@xlu("F:\qatest\stk5.dtf",item,"stk#",list)

The following works for me as normal @XLU:

Quote:
vtest = @xlookup("n:\data\qa5\ss\db\actions.dtf",857,"RECORD","COMPANY")


But these lines for List and ListAll both come back with blank values:
Quote:
vTest = @XLookupSourceList("n:\data\qa5\ss\db\actions.dtf","SMITH","COMPANY","COMPANY;PR
OJECT") 
and
vTestl = @XLookupSourceListAll("n:\data\qa5\ss\db\actions.dtf","SMITH","COMPANY","COMPANY
;PROJECT")
I think the syntax for the paths is correct, but think that perhaps there is some other error.

I am using WriteLn to see results.  I guess the good news is that they are not generating any error messages
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How do I xlookup a Q&A dtf database?
Reply #8 - Aug 16th, 2004 at 12:06am
Print Post Print Post  
Bob, Thanks for your feedback.

I saw the typo and worked around it, but still no luck.

Are your q&a databases opening up ok after using Sourcelistall?

Steve
  
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: How do I xlookup a Q&A dtf database?
Reply #9 - Aug 16th, 2004 at 12:58am
Print Post Print Post  
AAArgh!  NO!

My Q&A file now says it is not a  Q&A database.

WARNING TO ALL......DO NOT TRY TO DUPLICATE WITH A GOOD Q&A DATABASE !

I better have a backup......this was a critical file.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: How do I xlookup a Q&A dtf database?
Reply #10 - Aug 16th, 2004 at 1:30am
Print Post Print Post  
Yes, I have a backup from 8/13, not all is lost! Roll Eyes

Will let Erika and Mark work on this one.  Cannot risk real data.

Thanks for asking about that Steve.  I saw no messages, but did not look at the server log.  Will check that out now.
======
From the log:
Failed to open n:\data\qa5\ss\db\actions.dtf - incorrect version or format.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: How do I xlookup a Q&A dtf database?
Reply #11 - Aug 16th, 2004 at 4:02am
Print Post Print Post  
Sorry about that! Good thing you got a backup!

I'll wait to hear from Lanticans before I go any further on this one.

Steve
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: How do I xlookup a Q&A dtf database?
Reply #12 - Aug 16th, 2004 at 2:22pm
Print Post Print Post  
With the exception of XListValues, "X commands" that didn't exist in Q&A are not supported on Q&A databases. So:

XLookupAll
XLookupSourceList
XLookupSourceListAll
XPostAll

do not support Q&A .dtf files!

Bob,
It is likely that your .dtf file is only very mildly corrupt. The header string that starts every .dtf file reads:

SYMANTEC TOUCHBASE DATABASE

After you ran XLookupSourceListAll on that file you will see that the first 12 bytes have been overwritten (% = denotes junk):

%%%%%%%%%%%%CHBASE DATABASE

If you use your favorite ASCII TEXT EDITOR (I am not aware of any microsoft product (including notepad, wordpad, or MSWord) that qualifies as an ASCII only editor) you can replace those bytes with "SYMANTEC TOU" and save the file (use a backup). That should restore your .dtf to its original state.

The corruption occured, not the first time the XLookupSourceListAll failed to open the file - but the subsequent attempts on the same run. The command does set the @error flag to indicate the failure, and writes a message to error log indicating that it does not recognize the file type.

I have fixed the bug that caused it to erroneously believe that the file had loaded. The fix will be in the next release. I will also notify the folks in charge of documentation to explicitly state which XLookup extension commands support Q&A files (or I will get the new commands to work on Q&A files for the next release).

I am personally sorry for the missunderstanding.

Please be aware that this does not affect XLookup, XLookupR, XUserSelect, XUserSelectR, and XListValues, which should work on any .dtf files without corruption.

Supports Q&A Files:
XLookup
@XLookup
XLookUpR
@XLookUpR
XUserSelect
@XUserSelect
XUserSelectR
@XUserSelectR
@XListValues

Only Supports Sesame Files:
XPost
XPostR
XPostAll
@XLookupAll
@XLookupSourceList
@XLookupSourceListAll
« Last Edit: Aug 16th, 2004 at 3:53pm by The Cow »  

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


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: How do I xlookup a Q&A dtf database?
Reply #13 - Aug 16th, 2004 at 3:15pm
Print Post Print Post  
I think this problem of corrupting Q&A files should have its own "sticky" subject at the top of the forum discussions.  This is not a problem of a function not working, but a problem of corrupting a file in another application.  Once the problem is repaired, it could be removed as a sticky.

This should also be sent to Tom Marcellus for inclusion in next issue of Inside Sesame.
===========================
Quote:
I will get the new commands to work on Q&A files for the next release).
Obviously that is the best solution for all.

But if any of the "X" family commands will not work with Q&A, I think that something must be done with Sesame to prevent damaging the Q&A file if someone forgets a particular command cannot be used.  Commmand processor needs to look at source database for ".dtf" extension and abort the process immediately, before it tries to open the file and corrupts it.

I don't want to get into discussion about if the Q&A file is "corrupted" or the header is modified.  End result is the user cannot use the Q&A database, and tech support of some nature will be required to repair it.  And if the cause is not known, then it will only repeat itself.

And thanks for info to repair the header.  As it happened, I had already used my backup copy to replace the damaged one.  But the instructions will go into the toolbox for future use (hopefully, never needed).
============================
Whispering:I have known of other software companies who do not admit problems until they have a patch available (which probably needs its own patch).  We certainly don't expect that from Lantica.  Lantica will tell us up front about problems that can be created even if a solution is not readily available.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: How do I xlookup a Q&A dtf database?
Reply #14 - Aug 16th, 2004 at 3:44pm
Print Post Print Post  
Just one more small clarification re XPost, XPostR.:

You list 6 commands in lower section that summarizes, Only Supports Sesame Files

But in the section near the top where you list 4 exception files:
Quote:
With the exception of XListValues, "X commands" that didn't exist in Q&A are not supported on Q&A databases. So:

XLookupAll
XLookupSourceList
XLookupSourceListAll
XPostAll

do not support Q&A .dtf files!

XPost and XPostR did exist in Q&A, but are not listed there. 

Doesn't that mean that they should be listed in the group that work in both Sesame and Q&A?  But they are shown in the group that does not work with Q&A.  This conflicts with the earlier statement.

So is the final summary at the bottom of the posting, Only Supports Sesame Files, the correct listing and the earlier comment was not correct?

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print