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
Solved

TQuery.RecNo have -1 value?

Posted on 1998-04-15
2
705 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

789 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