[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

TQuery.RecNo have -1 value?

Posted on 1998-04-15
2
Medium Priority
?
766 Views
Last Modified: 2008-02-01
TQuery.RecNo have -1 value?
I want the same selected record
after the refresh like the dbase program
&&&&&&
recno = recno()
close
select 1
use data
go recno
&&&&&&&&&&
but the BCB program
recno = myQuery->RecNo;
myQuery->Close();
// do something
myQuery->Open();
myQuery->MoveBy(recno);
//////////////
Check the value of recno is -1.
Why? Can you tell me? Thank you!
0
Comment
Question by:mathematics
  • 2
2 Comments
 
LVL 5

Accepted Solution

by:
julio011597 earned 100 total points
ID: 1361551
Is this a query on an SQL database?

If so, here is the answer (cut-and-past'ed from the Help file):

"The RecNo property returns a record number for the current record in the dataset. Record numbers are only available for Paradox and dBASE tables; the concept isn't supported by most SQL servers so a table in a SQL database always returns -1 for RecNo."

HTH.
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1361552
mathematics, this is not first time i answer a question of yours and get either a low grade or an autograde... but, believe me, this will be last time.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month20 days, 2 hours left to enroll

872 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