Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

current record

Posted on 2000-02-14
5
161 Views
Last Modified: 2012-05-04
How do I define the current record in a table???
I have a table with 12 columns and 445 rows.
Column types are as follows:
col1 - string
col2 - string
col3 - string
col4 - string
col5 - numeric
col6 - string
col7 - string
col8 - numeric
col9 - numeric
col10 - string
col11 - numeric
col12 - numeric
My scenario is as follows: I have buttons, first, last, next and previous and they work fine. I wish to improve these slightly by adding a message dialog box if the record is already at the first or last record "This is the last/first record".
To do this, I have to be able to define the current record to compare the first, last, prev or next record.

I need the code to do this..
Thanks
0
Comment
Question by:traceysmall
5 Comments
 
LVL 6

Expert Comment

by:Jaymol
ID: 2518926
Need a little more info.  How is the data being stored?  (TTable, File of Record?)

John.
0
 

Expert Comment

by:Nuno1
ID: 2519193
are u using BDE ?
TTable TDataSet ?
0
 
LVL 2

Accepted Solution

by:
florisb earned 10 total points
ID: 2519226
Use the BOF en EoF properties of the table or query. Check them after every table move / insert / whatever by calling a custom buttonRefresh

Maybe better: Use the dbnavigator, to automate these things!

Floris
0
 

Author Comment

by:traceysmall
ID: 2521536
Thanks Floris
I'm quite new at Delphi programming and never even knew that there was such an easy way out of my misery..
Thanks again.
0
 
LVL 2

Expert Comment

by:florisb
ID: 2522304
No problemo!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Correct Component for Shopping Cart. 2 112
Magic Software info 18 138
Error E2158 compiling with Delphi XE10 Seattle 2 112
firemonkey Android Listview Sort items 7 49
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question