BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TTable's RecNo

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Giuliano
Guest





PostPosted: Mon Jul 19, 2004 9:56 pm    Post subject: Re: TTable's RecNo Reply with quote



On Tue, 20 Jul 2004 01:08:48 -0700, "Stas" <stama (AT) ihug (DOT) co.nz> wrote:

Quote:
Hi guys,
Could someone please tell me why would a RecNo property of TTable always be
equal to -1, and how to fix this(if possible)?
I'm using BCB 5 and have a table with a primary index stored in MySql.
Any help would be greately appreciated.
Thanks in advance.


Hi Stas,

isn't a good idea to use RecNo property with SQL servers. To retrieve a
specific record you should use the primary key instead. Relational databases
are "Value Oriented" data-base-management-system, they aren't "Object
Oriented" data-base-management-system. So, trying to retrieve a specific "row"
using the "record position" (i.e., making a parallel with an programming
language, trying to identify a specific row by position, like if the position
would be the object's address), IMHO is a bad practice because, as you have
seen, doesn't scale very well with RDBM server like, e.g., MySql.
Hence, you can try to use TDataSet::Locate and specify the primary key (i.e a
unique values combination of some fields) like search argument.
Also you can try to use the TDataSet's bookmarks-related methods:
TDataset::GetBookmark, TDataset::GotoBookmark and TDataset::FreeBookmark.

Giuliano

Back to top
Stas
Guest





PostPosted: Tue Jul 20, 2004 8:08 am    Post subject: TTable's RecNo Reply with quote



Hi guys,
Could someone please tell me why would a RecNo property of TTable always be
equal to -1, and how to fix this(if possible)?
I'm using BCB 5 and have a table with a primary index stored in MySql.
Any help would be greately appreciated.
Thanks in advance.

Stas


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.