How do I perform Insert, Update and Delete sqlite3 commands using C?

This is a discussion on How do I perform Insert, Update and Delete sqlite3 commands using C? within the C Programming forums, part of the General Programming Boards category; My values come from an HTML which I've already parsed with C. I figured out how to do Select command ...

  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    13

    How do I perform Insert, Update and Delete sqlite3 commands using C?

    My values come from an HTML which I've already parsed with C. I figured out how to do Select command and was able to print out my table but I can't seem to figure out how to do the Insert, Update and Delete commands. Can anyone give me a sample code please? Thank you

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,449
    Documentation on the SQL dialect's syntax and C interface is available from the SQLite website.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    Take the code that does your SELECT calls, change it so that it has the relevant DELETE or INSERT or UPDATE command instead. Not really that hard. Nothing to do with C, either, you're basically working with SQL when you get to the point that you're sending strings to SQL with SELECT etc. inside them.

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WPF Delete/Update/Insert Buttons
    By Tester84 in forum C# Programming
    Replies: 1
    Last Post: 12-06-2010, 10:02 PM
  2. Help with insert/delete binary search tree
    By Nazgulled in forum C Programming
    Replies: 39
    Last Post: 03-25-2009, 04:24 PM
  3. MS Access Insert/Update
    By BobDole in forum Tech Board
    Replies: 3
    Last Post: 08-25-2007, 08:45 PM
  4. Insert/Update Database (Urgent)
    By Joey in forum C++ Programming
    Replies: 3
    Last Post: 04-29-2002, 02:09 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21