Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2011
    Posts
    13

    Database basics and a Compiler?

    This I'm sure is a very basic question for anyone involved in databases but I am confused about something. Can't find a reference / book to tell me what I need to know.

    I'm attempting to us SQLite (desktop database), but I want to include it in my project (GUI and report generator) so I can make a single portable applicaiton. This is not the question, it's ultimately what I'm aiming for and yes I know there are a multitude of issues such as wrappers etc I'll need to consider.

    What I want to know is this: Lets say I'm using a Visual C++ Compiler and am starting my project (building a graphical user interface) in the editor screen in this compiler. How do I run queries in my code?

    My only experience is with Microsoft access where I take the following steps.
    Assuming a single database file:
    1 - I write the SQL queries in the query window (editor, whatever)
    2 - To run those queries I call them in my vba code from any given module using methodes imposed by ADO for example. (excuse my terminology).

    How do I do this in programming. Would SQLite have a screen where I type in all my queries and then call them using my C++ or C code in my project. OR,, do I include the source code files into my project (incorporate them into the Visual C++ compiler project window and action the queries by calling the SQLite functions in these source code files by calling them in my project code such as in Main()? Where do I write the SQL queries? Are these placed in my code and the SQL functions used to rund them? I'm assuming this means including an Include# file from the SQLite source code files in my main.cpp file. I hope this is making sense.

    I'm probably missing some big fundamentals here so if there's a book I should read then please let me know as the SQLite book I have (The definitive guide to SQlite doesn't seem to tell me everything I need to know. I'm probably just missing the very basics. I have forever to build this so it will be a great learning experience.

    Thanks so much.
    Dominover

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    if you are using SQLLite then I'd expect you to use an ODBC connection to interact with the SQL Lite engine
    https://www.google.co.uk/#hl=en&scli...w=1244&bih=913

    failing that you could try
    https://www.google.co.uk/#hl=en&outp...w=1244&bih=913
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Dec 2011
    Posts
    13
    Thanks for coming back. After some more reading it seems SQLite uses it's own system for connecting to a database (after all, it's embedded). I'll be building a desktop database application.

    I believe now that I have to download the source code files and include them in my project when compiling. Obviously I'll need wrappers to comunicate with the C interface with C++ though thats another issue.

    I was more interested in how to pit things together as I don't have allot of experience with this kind of thing. (only microsoft access and some basic C++ programming).

    The only thing that confuses me is if the SQLite source files are written in C and I'm using C++, would this mean that I would have to compile the source files separately to the C++ application and then link them together?

    Thanks
    Dominover

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    I dunno what you would have to do to embed a SQL Lite d, thats why I suggested ODBC..
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •