Subject Re: dBase crashes when tables are on a server
From Akshat Kapoor <akshat.kapoor@kapoorsons.in>
Date Sat, 18 Nov 2017 12:12:26 +0530
Newsgroups dbase.getting-started

On 17/11/2017 20:56, Danny Evers wrote:
> Danny Evers Wrote:
>
>> Danny Evers Wrote:
>>
>>> Akshat Kapoor Wrote:
>>>
>>>> On 17/11/2017 07:56, Danny Evers wrote:
>>>>> dBase crashes when tables are on a server, but run ok when files are on the computer. A compiled exe file runs ok either way with same code. If I comment out the filter statment in code below it runs ok when tables are on the server. This code was working at one time. It just started to fail without any changes to the code.
>>>>>
>>>>>      this.COMPANY1 = new QUERY(this)
>>>>>      with (this.COMPANY1)
>>>>>         left = 189.0
>>>>>         top = 12.0
>>>>>         width = 114.0
>>>>>         height = 108.0
>>>>>         database = form.DATABASE1
>>>>>         sql = "select * from Company.DBF"
>>>>>         active = true
>>>>>      endwith
>>>>>
>>>>>      with (this.COMPANY1.rowset)
>>>>>         with (fields["State ID"])
>>>>>            lookupSQL = "select * from state order by state"
>>>>>         endwith
>>>>>         with (fields["Country"])
>>>>>            lookupSQL = "select * from country order by country"
>>>>>         endwith
>>>>>         filter = ":Supplier ID: > 0"
>>>>>         indexName = "NAME"
>>>>>      endwith
>>>>>
>>>> How are you so sure that dbase crashes.
>>>> It may be taking more time.
>>>> I assume you are using dbf tables
>>>>
>>>> Take into consideration the following points
>>>> 1.        Total number of rows in the table
>>>> 2.        Number of rows that are to be returned
>>>> 3.        Number of users on the network
>>>> 4.        Wireless/wired network
>>>>
>>>>   From my personal experience I have observed that wired network gives
>>>> much better performance than wireless network.
>>>> The same task that is almost instantaneous on local takes considerable
>>>> more time over LAN
>>>> My table has approx 7k rows and query generally returns 2 or 3 rows.
>>>>
>>>>
>>>> A suggestion:
>>>> I do not know if this will effect speed or not
>>>> in place of filter why not use
>>>> sql = "select * from Company.DBF where 'supplier ID' > 0 "
>>>>
>>>> or use params
>>>>
>>>> Regards
>>>> Akshat
>>>
>>> The computer comes up with a window that says dbase has had an error and it closes out the program. I tried it on two different computers with the same results. I also tried it with dBase 11, dBase 10 and dBase 8 with the same results.
>> I will try your suggestion and see if that will work. Thanks
>
> OK I tried your suggestion and it looks like that works. Thanks again.
>
> sql = 'select * from Company where company."Supplier ID" > 0'

Glad that you found an easy way out.
Regards
Akshat