Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Borland > Re: Binary data...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 23 Topic 1066 of 1118
Post > Topic >>

Re: Binary databases

by Joe <joe@[EMAIL PROTECTED] > Dec 20, 2007 at 06:35 PM

Jason Burgon wrote:
> "Joe" <joe@[EMAIL PROTECTED]
> wrote in message
> news:13mh3qioollci1b@[EMAIL PROTECTED]
> 
>> Ok, do you have a way to tell when a database has 0 records in.
> 
> The general rule with all lists is to have a "Count" field that contains
the
> number of records or other elements in them. Obviously then, if Count =
0
> then the list is empty.
> 
> With zero-based lists, you iterate by going from item 0..Count-1, or
> visa-versa. eg:
> 
>   for RecNum := 0 to Count - 1 do
>   begin
>     List[RecNum] := Whatever;
>   end;
> 
I under stand that, But you have to remember that the 1st record starts 
at 0. If I tell it that if the RecNum:= filesize(?); and then I tell it 
what to do. Then I miss the 1st record. Get it. and if there is one 
record in it then that record starts again, at 0.

type
     user = record
	name: string[30];
	age: string[2];
     end;
var
person: file of user;

u: user;

assign(person, 'path\?');
rewrite(person);

recnum:= filesize(person); // This all ways starts at 0. No matter if 	 
                               there is 1 record in it or not.
if (recnum = 0) then goto ?; //Then I miss the first record.

Does that help
 




 23 Posts in Topic:
Binary databases
Joe <joe@[EMAIL PROTEC  2007-12-14 16:55:33 
Re: Binary databases
Robert Riebisch <Rober  2007-12-15 20:20:22 
Re: Binary databases
Joe <joe@[EMAIL PROTEC  2007-12-18 12:49:02 
Re: Binary databases
Jim Leonard <MobyGamer  2007-12-18 13:05:33 
Re: Binary databases
Joe <joe@[EMAIL PROTEC  2007-12-18 22:17:41 
Re: Binary databases
"Jochen" <jo  2007-12-19 05:17:45 
Re: Binary databases
"Jason Burgon"   2007-12-19 09:58:51 
Re: Binary databases
Joe <joe@[EMAIL PROTEC  2007-12-20 18:35:12 
Re: Binary databases
"Jochen" <jo  2007-12-22 15:22:05 
Re: Binary databases
Joe <joe@[EMAIL PROTEC  2007-12-22 20:03:44 
Re: Binary databases
"Jochen" <jo  2007-12-23 06:47:49 
Re: Binary databases
Joe <joe@[EMAIL PROTEC  2007-12-23 11:55:52 
Re: Binary databases
Jim Higgins <invalid@[  2007-12-23 23:48:54 
Re: Binary databases
Joe <joe@[EMAIL PROTEC  2007-12-27 09:09:39 
Re: Binary databases
Jim Higgins <invalid@[  2007-12-27 15:38:12 
Re: Binary databases
Joe <joe@[EMAIL PROTEC  2007-12-27 19:45:20 
Re: Binary databases
"winston19842005@[EM  2007-12-19 00:57:11 
Re: Binary databases
Jim Leonard <MobyGamer  2007-12-21 11:18:29 
Re: Binary databases
Joe <joe@[EMAIL PROTEC  2007-12-22 08:48:19 
Re: Binary databases
winston19842005 <bjjly  2007-12-22 09:17:11 
Re: Binary databases
Joe <joe@[EMAIL PROTEC  2007-12-22 20:05:32 
Re: Binary databases
Jim Leonard <MobyGamer  2007-12-24 10:34:36 
Re: Binary databases
Joe <joe@[EMAIL PROTEC  2007-12-27 09:12:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 0:15:18 CDT 2008.