Re: Finding a record number using SQL



I am using a query and have a DBGrid with a datasource pointing to the query
which is using an order by to sort the data by a specific field. What I want
to do is after inserting or updating a record I want to execute another SQL
statement to find the new inserted or updated records location with the data
result and move the record pointer within my DBGrid to point to that record.

Hope this makes more sense!

Jeff
"Del Murray" <Del.Murray@xxxxxxxxxxxxxx> wrote in message
news:47589ea1$1@xxxxxxxxxxxxxxxxxxxxxxxxx
What database?
What exactly are you asking ?>?? In most databases, except for FoxPro,
CLipper, DBase .. there is no "relative" record number.
You can have an identify field or a unique key .. is that what you mean?



.



Relevant Pages

  • Re: Sort 1, 1A, 2,3,4,9,10,10A,11,23,45,
    ... Marshall thanks for the reply. ... query but still did not sort correctly. ... It is an unusual sort in number order and take the letters into account ... Try inserting another sort level above the field sort using ...
    (microsoft.public.access.reports)
  • Re: Auto-generate recently visited record-list
    ... mock up a query using your specific table and some ... Form Company with CompanyID as primary key and autonummered / ... Table History with LogID and FkID ... On the company form I added a combo list CompanyName ORDER BY Inserting ...
    (comp.databases.ms-access)
  • Re: Auto-generate recently visited record-list
    ... On the company form I added a combo list CompanyName ORDER BY Inserting ... I made a history table as you wrote to me with LogID and FKID. ... query statement, or AddNew. ... to navigate throught the records ...
    (comp.databases.ms-access)
  • Re: Fastest way to get table scheme?
    ... The other part of the problem is that it's not just *one* query ... I have a form with a dbgrid. ... by the customer through a VPN tunnel with only 64 kilobits/second. ... Everytime the vertical scrollbar is moved (or if the user presses ...
    (borland.public.delphi.database.ado)
  • Re: Running counter
    ... >Hey guys any other ideas? ... Hi Michael, ... Here's another way to write the same query, ... inserting the rows. ...
    (microsoft.public.sqlserver.mseq)