[V4RB2] What's wrong with SQLSelect?

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Mar 29 19:41:45 CST 2005


On 3/29/05 6:35 PM, "Kem Tekinay" <ktekinay at mactechnologies.com> wrote:

> On 3/29/05 3:15 AM, Ruslan Zasukhin at sunshine at public.kherson.ua wrote:
> 
>> I am sorry I have not understand where is problem.
>> 
>> Search is fine, BUT ?
> 
> Let me try again with a better example.
> 
> Again, my REALbasic code is this:
> 
>   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
> 
> My database has 7 fields with 84,000 records, but, for this example, we'll
> say it has 3 fields and three records:
> 
> Zip_Code     City            State
> 10454        Bronx           NY
> 10530        Hartsdale       NY
> 10532        Hawthorne       NY
> 
> If I set the find variable to "105", the SQL command becomes:
> 
>  SELECT * FROM Zip_Codes WHERE Zip_Code LIKE '105%' OR City LIKE '105%'
>     OR State LIKE '105%'
> 
> This properly selects two records in both Valentina and REALdatabase.
> 
> Now I set find = "NY", making the SQL command:
> 
>  SELECT * FROM Zip_Codes WHERE Zip_Code LIKE 'NY%' OR City LIKE 'NY%'
>     OR State LIKE 'NY%'
> 
> This properly finds three records in REALdatabase, but finds nothing in
> Valentina. And that's the problem.

Kem, can you send us your test database,
So we can check in viSQL ?

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list