Thread: random access?

    #1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12

    random access?


    As of now, the only method I know to store and retreive is Fstream. Fstream is however very limiting and can't pinpoint specific areas of text within a text file, database, etc. My goal eventually is to design a program that stores names in a database, the names may be retrevied singly from that database by the user. Could someone point me in the direction I need to go to accomplish this task? From just guessing I would say programs as postgre would get the job done (not sure if that is the easiest way though). Any help, sites, etc. would be much appreciated. Regards.

    -andy
    hmmm...
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12
    anybody?
    hmmm...
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Feb 2001
    Posts
    1,481
    Rep Power
    15
    While you wait, how about going to google.com and typing "c++ database"?

    Or doing the same at amazon.com?
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12
    stud, I did that before I posted..I came across alot of postgre and sql stuff. Not sure if that is the best method to go about doing it though.

    -andy
    hmmm...
  8. #5
  9. Big Endian
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2001
    Location
    Fly-over country
    Posts
    1,172
    Rep Power
    30
    MySQL's C API:
    http://www.mysql.com/doc/en/C.html

    MySQL's C++ Library:
    http://www.mysql.com/products/mysql++/
    A code example:
    http://www.mysql.com/documentation/m..._Tutorial.html

    Postgresql's Programmer's Guide (C API):
    http://www.postgresql.org/docs/view....rogrammer.html

    Postgresql's C++ Library:
    http://gborg.postgresql.org/project/...rojdisplay.php

    ~2000 pages of Firebird documentation + API guide:
    http://firebird.sourceforge.net/inde...doc&id=userdoc

    Here's a link to another post where we discussed various database abstraction libraries. These libraries allow you to write code that will connect to various databases with minimal changes to your program.
    http://forums.devshed.com/t62684/sbd...d3a1ec871.html

    Most databases either install examples of C/C++ code when you install the database or have examples you can download.
  10. #6
  11. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12
    thanks for the resources..its reading time.

    -andy
    hmmm...
  12. #7
  13. Big Endian
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2001
    Location
    Fly-over country
    Posts
    1,172
    Rep Power
    30
    I was in Barnes & Noble drinking a big coffee when I came across an article in this months Linux Journal where they were talking about SQLite.

    Based on your initial post, if you're not doing anything huge and complex, this might be something you want to look at.

    http://www.sqlite.org/
  14. #8
  15. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12
    only issue..im on windows platform.
    hmmm...
  16. #9
  17. Big Endian
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2001
    Location
    Fly-over country
    Posts
    1,172
    Rep Power
    30
    I read about it in Linux Journal, but if you go to the website and look under features it says:
    • Built and tested under Linux and Windows.
    So if it fits your needs, it still may be a viable solution.

IMN logo majestic logo threadwatch logo seochat tools logo