Hi Gavin,
No firm ideas, but a WAG is that mixing the two DBF types is giving VFP a headache. Why not create a preprocess table with "client" with SELECT * FROM client INTO cursor VFPclient and then use VFPclient in your query? Who knows, might actually work :-)
>
>I'm getting an error 'SQL: Internal error.' when issuing the following SQL Statement:
>
>
>SELECT * ;
> FROM loadfile, client ;
> WHERE NOT EMPTY(loadfile.searchstr1) ;
> AND UPPER(ALLTRIM(loadfile.searchstr1)) $ ALLTRIM(UPPER(client.company))
>
>
>Loadfile is a VFP6.0 table and client is a FPW2.6 Table. Searchstr1 and Company Fields are both defined as C(55).
>
>The online help states the following:
>
>
>SQL: Internal error (Error 1800)
>An internal error has occurred.
>
>Record your recent actions while using Visual FoxPro and then call Microsoft
>Support.
>
>
>The Technical Writers must have been up all night thinking about this one !!!
>
>What I'm trying to achieve is to find a group of clients using a partial match on Company Name, E.g. if Searchstr1 contained 'Bunbury' then I want to find all occurences in the Client table that contain 'Bunbury' somewhere in the Company Name Field.
>
>Any Ideas as to what the problem might be?
>
>Thanks,
>Gavin...
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05