Solved

current record

Posted on 2000-02-14
5
162 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 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 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