Solved

TQuery.RecNo have -1 value?

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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