What's wrong with SQLSelect?

Kem Tekinay ktekinay at mactechnologies.com
Mon Mar 28 22:36:57 CST 2005


I have a zip code database on which I use the following RB code:

  if find = "" then
    sql = "SELECT * FROM Zip_Codes"
  else
    sql = "SELECT * FROM Zip_Codes WHERE " + _
        "Zip_Code LIKE '" + find + "%' " + _
        "OR City LIKE '" + find + "%' " + _
        "OR State LIKE '" + find +"%'"
  end if
  
  try
    curs = gDB.SQLSelect( sql, EVCursorLocation.kClientSide,
EVLockType.kReadOnly, EVCursorDirection.kForwardOnly )
  catch err as VException
    MsgBox gDB.ErrString
  end try
  
The problem is, while the search is fine when I use a zip code value, it
fails when I use a value found in City or State (both indexed). The same
search works fine in the REALdatabase.

What have I missed?

__________________________________________________________________________
Kem Tekinay                                                 (212) 201-1465
MacTechnologies Consulting                              Fax (914) 242-7294
545 Eighth Avenue, Suite 401                          Pager (917) 491-5546
New York, New York 10018                    http://www.mactechnologies.com

To join the MacTechnologies Consulting mailing list, send an e-mail to:
  mactechnologies_consulting-subscribe at yahoogroups.com



More information about the Valentina mailing list