Recent

Author Topic: A beginner Q: Connecting a Class to a Database  (Read 2268 times)

timtims33

  • Newbie
  • Posts: 4
A beginner Q: Connecting a Class to a Database
« on: September 20, 2013, 12:00:10 am »
Hi, I'm a total Noob to DB connectivity and Classes.  I've been learning about classes in some basic examples, where i store a small amount of data during run-time.   My question is...i've built a MS Access database with lots of records.  Is it possible for me to somehow bring those records into the Class structure I've created?  Not necessarily interested in the syntax...really the mechanism/ principle by which this can happen.
Regards,tiny.
« Last Edit: September 20, 2013, 12:07:58 am by timtims33 »

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: A beginner Q: Connecting a Class to a Database
« Reply #1 on: September 20, 2013, 04:53:07 am »
Personally I disconnect my OO framework from the underlying datastructure.  In my mind they are two different items serving two different purposes.

However, I realise I'm in the wrong.  There's a framework which I've been meaning to look at for a while now which may help you in this regard:

http://tiopf.sourceforge.net

There's a few discussions on this forum, and it looks like there is plenty of documentation with that framework.
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

 

TinyPortal © 2005-2018