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

  • Home
  • SEARCH
  • 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 6028081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:41:10+00:00 2026-05-23T04:41:10+00:00

Hello I’m trying to save string into SQLite database, but nothing happens. I have

  • 0

Hello I’m trying to save string into SQLite database, but nothing happens. I have a string:

“tret44404%40ukr.net%3A100001740940428%3A06Kz8p1Xbk0PzpH%2F%3A0%3Av_1%2Cajax_1%2Cwidth_320%2Cpxr_1%2Cgps_1%3A1307716802”

I’m trying to save it to database but it saving string as:

“tret44404
80792kr.net-0X1.FD428P+01000017409404280X1.B2C260000001P-100906Kz8p1Xbk0PzpH0.0000000X1.149242P-104700X1.400000018P-1040v_1灠ajax_1Ῐwidth_320″

A method how I save string:

- (void) addCookie {


    if(addStmt == nil) {
        const char *sql = "insert into FaceBookCookies(userId, created, domain, Expires, HttpOnly, Name, Path, Value) Values(?, ?, ?, ?, ?, ?, ?, ?)";
        if(sqlite3_prepare_v2(database, sql, -1, &addStmt, NULL) != SQLITE_OK)
            NSAssert1(0, @"Error while creating add statement. '%s'", sqlite3_errmsg(database));
    }
    sqlite3_bind_int(addStmt, 1, userID);
    sqlite3_bind_int(addStmt, 2, created);
    sqlite3_bind_text(addStmt, 3, [domain UTF8String], -1, SQLITE_STATIC);
    sqlite3_bind_double(addStmt, 4, [Expires timeIntervalSince1970]);
    sqlite3_bind_text(addStmt, 5, [HttpOnly UTF8String], -1, SQLITE_STATIC);
    sqlite3_bind_text(addStmt, 6, [Name UTF8String], -1, SQLITE_STATIC);
    sqlite3_bind_text(addStmt, 7, [Path UTF8String], -1, SQLITE_STATIC);

    sqlite3_bind_text(addStmt, 8, [Value UTF8String], -1, SQLITE_STATIC); //here is a String...

    if(SQLITE_DONE != sqlite3_step(addStmt))
        NSAssert1(0, @"Error while inserting data. '%s'", sqlite3_errmsg(database));
    else
        //SQLite provides a method to get the last primary key inserted by using sqlite3_last_insert_rowid
        userID = sqlite3_last_insert_rowid(database);

    //Reset the add statement.
    sqlite3_reset(addStmt);
}

Please help how to fix it…

  • 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-05-23T04:41:11+00:00Added an answer on May 23, 2026 at 4:41 am

    You must probably remove the percent escapes before saving. Do it like this,

    sqlite3_bind_text(addStmt, 8, [[Value stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] UTF8String], -1, SQLITE_STATIC);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I'm a trying to learn python, In C++ to read in string from
Hello I have the following error by git-fsck, which cannot be cleaned by git-gc
Hello again ladies and gents! OK, following on from my other question on ASP.NET
Hello I am compiling a program with make but I get the error of
Hello we have an SQL server application running over a low bandwith connection. We
Hello I have two dependants select box, the second one is popularited after onchange
Hello everyone i have big query to calculation and counter by clinic ID SELECT
Hello I am using jquery layout plugin from http://layout.jquery-dev.net/ . my options are following:
Hello I have a Problem with some Buttons I would like to create a
Hello in my java class Toto, I have 3 static methods I would like

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.