Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9048389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T12:08:43+00:00 2026-06-16T12:08:43+00:00

The title is pretty much all the information I have because I cannot find

  • 0

The title is pretty much all the information I have because I cannot find an issue with the code. The same instance of database that is being used in the code below is able to successfully insert, delete and select, but this function does not work. No error code is retured(Always 0), and the program continues to run nominally after executing this function.

Here is the table information:

reminder (uniqueID integer primary key autoincrement, title text not null, details text, time integer)

Code in question:

- (void) updateEntryData:(ReminderData *)data
{
    sqlite3_stmt *statement; 
    char *updateCommand = "UPDATE reminder SET title = '?', details = '?', time = ?    WHERE uniqueID = ?";

    int e = sqlite3_prepare_v2(database, updateCommand, -1, &statement, nil);
    if(e != SQLITE_OK) {
        NSLog(@"Problem with updateEntryWithUniqueID");
        NSLog(@"Error Code: %d, message '%s'", e, sqlite3_errmsg(database));
        return;
    }

    sqlite3_bind_text(statement, 1, [data.title UTF8String], -1, SQLITE_TRANSIENT);
    sqlite3_bind_text(statement, 2, [data.details UTF8String], -1, SQLITE_TRANSIENT); 
    sqlite3_bind_int(statement, 3, [data.time timeIntervalSince1970]);
    sqlite3_bind_int(statement, 4, data.uniqueID);
    NSLog(@"\nID: %d\nTitle: %@\nDetails: %@\nTime: %@", data.uniqueID, data.title, data.details, data.time);

    if(sqlite3_step(statement) != SQLITE_DONE) {
        NSLog(@"Problems updating entry in reminder");
    }

    /* Finished */ 
    sqlite3_finalize(statement);
}

Any help would be greatly appreciated; I am stumped.

Edit: Forgot to mention that the sql command used works when entered into the sqlite console.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T12:08:44+00:00Added an answer on June 16, 2026 at 12:08 pm

    Just remove the single quotes around the parameters. Wrapping the placeholders will make it a value and not a parameter anymore.

    char *updateCommand = "UPDATE reminder SET title = ?, details = ? .....";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The title pretty much says it all. I have a project that for political
The title pretty much says it all. I have a regex that I need
The Title pretty much says it all. I have an XML document that I
The title pretty much explains it all, I have a Member object that references
The title pretty much explains it all, I have a Member object that references
The title pretty much describes it all.. According to the information of the Acer
The title pretty much says it all, but basically I have a main parent
The title pretty much says it all, but here's some background. We have a
The title pretty much says it all, so here's the code: #include <stdio.h> /*
The title pretty much says it all, I've got a 'web site' that was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.