×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Any tips on Linking an Array and a Random access file ?

Any tips on Linking an Array and a Random access file ?

Any tips on Linking an Array and a Random access file ?

(OP)
I'am trying to get the same kind of functionality of a Database without the overhead of the Jet engine, basicaly,
Add a new record, Edit a record and Delete a record, Add and Edit are pretty straight forward but Delete is giving me some problems; What I came up with was to copy the array into a temporary array, redimensioned minus the record to be deleted, then overwrite the Random access file with the temporary array, then copy it back into the orginal array. All though it works, it seems alittle messy. Does anyone know of a better way?
Thanks
Collin

RE: Any tips on Linking an Array and a Random access file ?

I have had nothing but problems from the jet engine. If you have found a solution (even an incomplete solution) please post it. We rely on new technology.

RE: Any tips on Linking an Array and a Random access file ?

This sounds like a tall order to me.

I don't use the Jet engine myself - I'm an Oracle kind of chap - but people seem to use it without much bother (except Alt255 it seems <grin>).

Re-inventing wheels is very time consuming. Have another look at Jet.

Mike

Mike Lacey
Mike_Lacey@Cargill.Com

RE: Any tips on Linking an Array and a Random access file ?

Mike, you’re right. I am probably the only person in the world who hates Jet and the thousand variants it has spawned. So what if Jet drives half of the databases in the world? That doesn’t mean we have to like it, or even need a good, rational reason for hating it. Call it unthinking prejudice, call it aggravated impatience learned from spending many minutes waiting for the engine to load on slower ‘86 class machines and then watching it crash during the first query. Call it stubborn, pig-brained, bull-headed, contrary and inefficient... call it what you will. I’d rather work with flat files any day.
It’s true, computers have come a long way. Some of use refuse to forgive the early insults and go with the SQL flow. May be my loss, but I’m living with it quite well, thank you. :)

And Collin, for what you are trying to do, I think you're on the right track.

RE: Any tips on Linking an Array and a Random access file ?

Peace! Truce! No offense intended. If my company could afford Oracle I wouldn't be the mean-spirited old man I've become in the last year. ;~}

RE: Any tips on Linking an Array and a Random access file ?

What I do is put a chr(255) a the beginning of the field and check for it when I read the file, if is Chr(255) is a deleted record. You have to make a compact function to pack the file without the deleted records, but don't have to do it all the time.
Maybe is not what you wanted but is faster is you need to delete several records at once.

RE: Any tips on Linking an Array and a Random access file ?

Touche, Hug. I prefer chr(229) - the directory entry marker for a deleted file - but the principle is the same whether the marker is part of the "Last Name" field or resides in a special field to indicate record status: the record is ignored except on "add record" and "compact database" operations.

RE: Any tips on Linking an Array and a Random access file ?

You can use either, the important factor is the result :)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close