Solved

current record

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
code issue 8 130
Process Javascript errors with Delphi TWebBrowser 1 132
Adoquery sql  left join does not work 25 90
update joined tables 2 46
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

773 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