Solved

TQuery.RecNo have -1 value?

Posted on 1998-04-15
2
712 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
[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
  • 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE10 Round Image 2 193
Downloading email attachments 2 85
QRReport  TQrmemo vertical stretching 1 57
Adoquery sql  left join does not work 25 106
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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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