🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.data.sql
Article #1222

Size Does Matter.

#1222
From: Geoff Wass
Date: Thu, 09 Apr 1998 00:00
91 lines
3134 bytes
=============================================================
Hello Everyone!

This may or may not be related to my previous posting concerning an
SQLEXEC( ) error. The following program (shown at the bottom of this
message) was meant to test SQLEXEC( ) and demonstrate my problem, but it
actually works! So why post it? Well, because if I change the file that
is being queried (which has the same structure and indexes as my test
files), the program will fail at the points indicated with the 239 IDAPI
(BDE) ERROR message. In other words, my problem will come back.

The only difference that I can see between the files that work and the
files that don't is the number of records in the file. The test files
which I created had up to 100,000 records. The production file has about
1,000,000. Theoretically this should make no difference - but, then how
often do theories work? I unfortunately, do no have the disk space
necessary to create a test file the same size as my production file.

If you study my test program it points out a fine point concerning
problem. If the file is small (like my 100,000 record file) then all 5
queries shown will work. If the file is large, only 2 of the 5 queries
will work. Changing to a directory that is different from the directory
in which the data resides makes the query work if the file is large.

If anyone could shed some light on this problem I would be grateful as I
am anxious to use a program based on SQLEXEC( ) to extract important
records from my main 1m record production file. It does not seem to
matter if I use VdB 5.6 with BDE 2.5 or 4.5.


Geoff Wass
Kuala Lumpur, Malaysia




Triumph is in the first syllable.




============ cut here =================

PROCEDURE Test

   CLEAR

   SET SAFETY OFF

   CD c:\MyDir1
   ? SQLEXEC( "SELECT * FROM 'c:\MyDir1\MyFile' WHERE Employee =
'0001994'", "NewFile" )
   USE NewFile
   COUNT
   USE

   CD c:\MyDir2 && THIS WORKS!
   ? SQLEXEC( "SELECT * FROM 'c:\MyDir1\MyFile' WHERE Employee =
'0001994'", "NewFile" )
   USE NewFile
   COUNT
   USE

   CD c:\MyDir1
   ? SQLEXEC( "SELECT * FROM 'c:\MyDir1\MyFile' WHERE Employee =
'0001994'", "NewFile" )
   USE NewFile
   COUNT
   USE

   CD c:\MyDir2 && THIS WORKS!
   ? SQLEXEC( "SELECT * FROM 'c:\MyDir1\MyFile' WHERE Employee =
'0001994'", "NewFile" )
   USE NewFile
   COUNT
   USE

   CD c:\MyDir2
   ? SQLEXEC( "SELECT * FROM 'c:\MyDir2\MyFile' WHERE Employee =
'0001994'", "NewFile" )
   USE NewFile
   COUNT
   USE

   CD c:\MyDir1

   SET SAFETY ON

RETURN
=============================================================
Technical Details
Message-ID: <352C97F3.58F38EB7@ibm.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,f535a19814bae7b9,start
X-Google-Attributes: gidff5a1,public
From: Geoff Wass <gswass@ibm.net>
Subject: Size Does Matter.
Date: 1998/04/09
Message-ID: <352C97F3.58F38EB7@ibm.net>
X-Deja-AN: 342363111
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
Organization: Noordindarus Consultancy Sdn. Bhd.
Mime-Version: 1.0
Newsgroups: borland.public.vdbase.data.sql