Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

current record

Posted on 2000-02-14
5
Medium Priority
?
167 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
[X]
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
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 30 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

721 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