Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Databases with Turbo Delphi

Status
Not open for further replies.

Typhoonbot

Programmer
Sep 12, 2009
2
ZA
Hello all :)

As my subject suggests, I am working with Turbo Delphi.

I have a database with a table called "tblWords" which has a field called "Words". I want to extract a record from the "Words" field, in a SPECIFIC POSITION (ie: the record from position 145). ( I actually want to extract a random record from the field, but just telling me how to get anyone will be fine ).

How can I do this with delphi ?

ps: I have linked the database etc.
 
Hi, dont worry, what I ended up doing was giving every record in this field a autonumber (with Index field). I then generated a random integer value between (0 and RecordCount). and simply used an SQL statement where I checked "WHERE Index LIKE <Random Generated Number>". It works very well :)

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top