 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Giuliano Guest
|
Posted: Mon Jul 19, 2004 9:56 pm Post subject: Re: TTable's RecNo |
|
|
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
|
Posted: Tue Jul 20, 2004 8:08 am Post subject: TTable's RecNo |
|
|
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 |
|
 |
|
|
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
|
|