VB ELF FAQ (Frequently Asked Questions)

Q) Does VB ELF write SQL with the appropriate syntax for Microsoft SQL Server 6.5? Does ELF work with other ODBC databases?
Well, we can finally answer this question without going into a lot of mumbo-jumbo. As of version 2.0, VB ELF works with any ODBC data source. You can use the Microsoft OLE DB Provider for ODBC with any ODBC data source and get true client-server performance. If you have a native OLE DB Provider for your database, by all means we can support that as well. If you were happy using a Jet MDB as a "front end", attaching to your ODBC tables via Jet, we still fully support that option also. Basically, we've got it covered.

Q) Will your system work on the Internet?
Yes. See our demos on the Demo Gallery page

Q) I want to create an natural language interface to my Web database -- just like your Northwind demo. But my Web Hosting service won't permit me to register ActiveX controls on their server. They say it's too difficult to ensure system stability.
We offer "virtual Web hosting" services for your database. For a very modest monthly charge, we will host your database on our Windows NT 4.0 Internet server machine. The cost also includes consultation services, on setting up and customizing your database interface.

Q) Are you doing a C++ version? Does the OCX work ok in VC++
There are two OCXs both of which operate in any environment that supports ActiveX. They're called vbELF.OCX and dELFi.OCX, but the names are probably misleading because they don't only work in their respective environments. Rather, the vbELF.OCX component is suited for programming environments which have native access to the Jet engine, such as Visual Basic and Access 8.0. The dELFi.OCX is useful for languages which don't have native Jet access (like Delphi), but require references to Jet (.MDB) files to use the ODBC Data Source mechanism.

Q) I want to use VB ELF to help me write SQL statements, which I will then cut and paste into my applications. What's the minimum I need to do this?
You can do this nicely with just the VB ELF stand-alone edition. It doesn't include a distribution license, nor the OLE Server, OCX or source code. But it will translate queries so that you can get that SQL into your app quickly and spend your time polishing the interface.

Q) Do I need two products for Access 97 and VB5? Or does one OCX do both?
The vbELF.OCX component can be used in Access 8.0, but there are some reasons why you might want to use Access ELF 97 instead. Access ELF integrates tightly within the Access environment. For instance, when you create queries, they're saved right into the database you're working in. So are forms and tables. With VB ELF, the display screens are hosted by the VB ELF application, which is a Visual Basic program. So you cannot request a form-style response and then save it off as an Access form.
      On the other hand, there are also several good reasons why you might want to use the OLE Server or OCX within Access 8.0 as well. The OLE Server gives you function-by-function access to the entire range of natural language services provided by the ELF language engine. So you can much more easily customize your application using the OLE Server API, instead of the Access ELF application. And the OCX is a nice, convenient wrapper around the OLE Server functions.
      As an example, let's say you want to create two completely separate interface grammars that work off two separate attached MDB files. When your user pops open form A they'll be asking about the Airline Industry; when they open form B they want to ask about Baseball statistics. Using VB ELF, you can ensure that the proper database and related grammar is loaded at the right time. Everything is under the developer's control. With Access ELF, you would need to rely on the user to click the Options screen and select the appropriate "view". (*)
      Or let's say you want to prevent your users from getting access to the dictionary and/or phrase functions. With VB ELF, you can simply build in as much or as little functionality as fits your application.

(*) Actually, you could do this in Access ELF as well, by copying the code from the Options screen that we use to load the different views (the 32-bit Access ELF code is not encrypted or otherwise hidden).

Q) Can I save a Query to a name I want? When ELF Query creates a file it names it for me ie. elfQ1. Can I name this what I want?
Use the Save button on the SQL form to rename a query. If the query is a series of SQL statements, the Save button will use the name you provide to rename the entire set of queries, eg. MyQuery1, MyQuery2 etc.

Q) Can your elf easily update our existing records with just the fields from the new update that are filled in? In other words, we do not want to lose any old data, we need to only overwrite those fields with data entered in the updated record.
The answer is easy: no. ELF is a query tool only, and never modifies any data in your tables. Natural language queries are too easily misinterpreted to be used as data manipulation tools at this time. While it's sometimes frustrating to get an unexpected result from a Select Query, it might well be disastrous to get an unexpected result from a Modify Query.

Q) Can ELF handle wildcards?
ELF accepts the LIKE operator, so you can easily enter queries such as: Show customers with company names like "*super*"

Q) Can it perform tasks as complicated as querying a field which has two separate bits of info separated by /? Ex. A/B, I need info from A only.
For instance, category is: Meat/Poultry. Can you ask, Who purchased poultry in the past 30 days? Sure!
SELECT DISTINCT Customers.CustomerID , Orders.OrderDate , Categories.CategoryName , Orders.ShipName , Customers.CompanyName FROM Orders , Customers , [Order Details] , Products , Categories , Orders INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID , Orders INNER JOIN [Order Details] ON Orders.OrderID = [Order Details].OrderID , [Order Details] INNER JOIN Products ON [Order Details].ProductID = Products.ProductID , Products INNER JOIN Categories ON Products.CategoryID = Categories.CategoryID WHERE ( ( ( ( Categories.CategoryName LIKE "Poultry*" or Categories.CategoryName LIKE "*[!A-Z0-9]Poultry*" ) ) and Orders.OrderDate >= DateAdd ( "d" , -1 * 30 , DATE() ) ) and Orders.OrderDate <= DATE() ) ;

Q) Why does VB ELF constantly add funny-looking things to the query, like "*[!A-Z0-9]Poultry*"?
Let's say you wanted to know about beer and ale products, and you asked "Which customers purchase ale?" Because "Ale" is contained in "Sasquatch Ale", you need a construction like "*ale*". But then you'd also get "Queso Cabrales" which is not beer but, guess what, cheese!
      Or, say you had a bird-watching database and wanted to list the red birds. Try "*red*". If you get "Yellow-collared flaxwing sparrow", you might wonder if the system was color-blind. Oh ... collaRED!

Q) I only see one field in my answer. For example, if I ask for all customers in NC, I'll get a list of records but those records will only contain the LASTNAME field. How can I see every field?
Use the keywords "everything" or "anything"

Q) Is it possible to print out the HELP manual all at once, instead of opening one subject at a time and printing it?
VBELF.HLP is now also distributed in plain text form as VBELFHLP.TXT.

Q) How can I uninstall VB ELF on one particular MDB?
To uninstall for a given MDB you just delete anything with the "elf" prefix from the database. Then, using the Explorer or DOS, delete the VBELF\XYZ.ELF directory, where XYZ is the name of your .MDB file.

Q) I have VB ELF set up on a network drive and I'm trying to create interfaces for MDBs on other drives. I don't want the ELF directories to go into the VBELF directory because they're taking up too much space. Help!
You can set the destination path of the .ELF directories by changing the setting of the Search In drop-down box on the ELF Options window. By default, it says VB ELF directory, and all grammars get stored as subdirectories of the directory you chose during installation. If you select Current Directory instead, grammars get stored as subdirectories of whetever directory your MDB is in. You can also type in a path, and put the .ELF grammars anywhere you want. Please see the Search In topic for more details.

Q) Can I specify the display format for date and currency information?
The default formats for Date, Currency and Yes/No types can be changed by adding Registry keys under HKEY_CURRENT_USER \ SOFTWARE \ VB and VBA Program Settings \ VBELF \ VBELF2.0
The default setting for key DateFormat is "d-mmm-yy"
The default setting for key BooleanFormat is "Yes/No"
The default setting for key CurrencyFormat is "$#,##0.00;($#,##0.00)[Red]"

Q) I cannot get VB ELF to understand my questions. For instance, I ask "How many mammals" and I just get "Sorry, unable to interpret the question."
Two points to keep in mind. VB ELF is unlike other query processors in that it expects true English input. So talk to it in full sentences: "How many mammals are there?" might work better. On the other hand, it's still a computer program and quite literal. So if mammals is a category in your MDB, ELF might count the categories like "mammal" and come up with an answer of 1! A better question is, "How many animals are mammals?" Keep experimenting till you get the feel of it...

Q) The data base where I have ELF installed gets updated once a month with sales infomation, usually monthly buckets, YTD figures, etc. As the year goes along, do I have to re-analyze the data base after every update?
You don't have to re-analyze unless a) you change the database structures, in other words add tables or fields or b) if you add a lot of text data such as new clients AND you expect the system to recognize which field that data is from. Let's say you get a new client named Jones. Before you re-analyze, Show me all information about Jones won't work, but Show me all information where last name is "Jones" will work. After you re-analyze, both versions will work because "Jones" has been entered into the dictionary. If you're just adding numeric information like monthly dollars, there's no need to reanalyze.

Q) I'd like to make sure that, as I make adjustments to the ELF dictionary or settings, queries that once worked continue to work. Is there some way I can automate the process of checking?
Yes. We use regression testing to check all our test databases, and the test functions are available to you as well. Just create a Table called elfTestSuite with text fields Query, [First Cell] and [Last Cell]. Add the queries you want to check into the elfTestSuite Table, and cut and paste the first (upper-left) cell of the datasheet response into the [First Cell] field. Paste the last (bottom-right) cell of the response into the [Last Cell] field. Now open the ELF Query window and use the right mouse button to click our mascot the VB Elf. All the queries in the table will be processed, and the datasheet answers will be checked against the stored values. Any differences will be flagged with a message box. As you make changes to the system, you can continue to run this check to make sure everything keeps working.
      To stop running the test suite, click the Close button on the Query window.

Q) Where are temporary files stored while ELF is working?
Temporary files are stored into the TEMP directory that's set in your "environment". Usually it's set by a statement like
      SET TEMP=c:\windows\temp
in your AUTOEXEC.BAT file. On other systems it's set by the log-in software. You can find out if you have a TEMP directory assigned by entering SET at the DOS prompt, and seeing if TEMP= appears in the environment list. If there's no TEMP directory, VB ELF uses its install directory to store temporary files.

Q) Will ELF have a problem with attached tables?
There shouldn't be any problem with attached tables. The only very subtle difference is that it can't detect the indexes, which it uses to help make decisions about key values. 99% of the time the results are the same, though.

Q) What are the the minimum system requirements for VB ELF?
VB ELF should run on any 486 or higher system, but we strongly recommend that you use it on systems with at least 8 Meg of RAM. Because the Analysis process is highly "processor-intensive", we also suggest running the Analysis using the fastest machine available. Large databases that can process in 10 minutes on a Pentium with 16 Meg often take several hours on a 386 with 4 Meg.

Q) Does it matter how much data is in the MDB?
The amount of data in the MDB is the main factor in determining how long the Analysis takes, because nearly everything gets put into the dictionary. This can take a lot of disk space, but when the program is working well, we think this is a cheap price to pay for quick answers to queries. It's like another, very complex, indexing system.

Q) My field names are not exacty "natural language", so I get a few unpredictable results. What's the best way to handle this?
Use the Phrases button on the Options window to open the Phrase Editor. There you can enter translations for the "unnatural" field names. For instance, you can enter,
      When I Type: product I Mean: f_pdctKey1

Q) When trying to compile large tables, I kept getting a message that says "Exceeded dictionary capacity". What's my next step?
The error message means that the Analyzer seriously underestimated the requirements of your dictionary. It's caused by having lots of fields with very long text data, or enormous memo fields. To fix this, use the Custom Analyze feature, and click on a value larger than the "AutoSelect" mechanism chooses.

Q) The Query History form is always empty, no matter how many queries I enter!
You've probably neglected to turn the Query Logging feature on. When logging is ON, the green light next to the Query History button appears "on" (lit-up). If the light is off, open the Query History window and press the "Log queries" button on the upper right. When the embedded light goes on, logging has been activated.
      Another way to view previous queries is to use the up/down arrows on the ELF Query window. But this method only shows you queries entered during the current session.

Q) Some of my queries have returned meaningless responses and I'm wondering if there is something I should have setup in the database prior to installing ELF. For instance, "Which members are male?" or "Which members are female?" return the same answer, all the records in the member table.
What ELF can't understand it ignores, so you probably need to add
      When I Type: male I Really Mean: Sex = "M"
      When I Type: female I Really Mean: Sex = "F"
to the Phrases table. You can access the Phrase editor via the Options window.

Q) Are there any common database practices that interfere with ELF's ability to understand questions?
We suggest you avoid prefixing your fieldnames. Many Access/VB developers use prefixes for all their types, for instance tblOrders, qryMonthlyOrders, fldOrderID, frmOrderEntry, rptQuarterlySales, mcrRunYTDTotals, modOrderProcessing. You might notice that, with the exception of the "fld" prefix for "field", all the others match tabs on the Microsoft Access database window. We think there's nothing wrong with using these prefixes, if they help you keep objects straight in your application. But unlike the other objects, fields are often named explicitly by users when creating queries, and they're unlikely to abide by your naming convention. VB ELF does make every effort to "look past" the field prefixes if they exist, but it can become confused in some situations where it's trying to associate field names with commonly used expressions.

Q) Can VB ELF understand my VB Basic functions?
No. Unfortunately, despite the documentation to the contrary included with Visual Basic 4.0, Microsoft still has not implemented a feature allowing user-defined functions to be included in SQL queries run from within VB. Therefore VB ELF cannot duplicate this functionality of its predecessor, Access ELF. We think this is an unbelievable oversight. If you have any clout with the guys in Redmond, let them know you think so too! (P.S. They STILL haven't got this right in Visual Basic 5.0; no, not in 6.0 either!)

Last Updated: August, 2009

http://www.babblebooks.com/shopping/shoppodcasts.asp http://www.babblebooks.com/shopping/bbcatalog.htm