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 541567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:21:23+00:00 2026-05-13T10:21:23+00:00

Core dumped while running this program: int main(void) { sqlite3 *conn; int error =

  • 0

Core dumped while running this program:

int main(void) {
   sqlite3 *conn;
   int     error = 0;

  error = sqlite3_open("cloud_db.sqlite3", &conn);
  if (error) {
          puts("Can not open database");
          exit(0);
  }

  error = sqlite3_exec(conn,
          "update server set servername=\'Laks\' where ipaddress=\'192.168.1.111\'",
        0, 0, 0);
  if (error) {
          puts("Can not update table");
          exit(0);
  }
  sqlite3_close(conn);

  return 0;
}

I have tried accessing (select query) sqlite using C and it shows the contents – that’s fine. How can I use queries like update? Above I’m trying to execute a query like:

update server set servername="Laks" where ipaddress="192.168.1.111";

running this query with in sqlite> works fine. How to execute (update query) it from C program?

  • 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-13T10:21:23+00:00Added an answer on May 13, 2026 at 10:21 am

    Since you point out that the problem is there when the statement contains “servername=\’Laks\'” and leaves when you change that to “servername=Laks” I guess the backslashes cause the problem. You don’t need backslashes to escape the apostrophe in string literals. Simply use “servername=’Laks'”. You escape quotes (“) in string literals and apostrophes (‘) in character literals, but not vice versa.

    You also need to add the semicolon (;) at the end of the query string: “whatever sql statement text;”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 295k
  • Answers 295k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I found that it was some CSS giving me problems.… May 13, 2026 at 6:52 pm
  • Editorial Team
    Editorial Team added an answer The following function and autocommand will cause matching files to… May 13, 2026 at 6:52 pm
  • Editorial Team
    Editorial Team added an answer While the user is moving around the menu you get… May 13, 2026 at 6:52 pm

Related Questions

I'm trying to combine code on two branches with the 'git merge' command, but
Sometimes when I run my code, a core dump file is generated when I
I got this error message from the C++ compiler: CC: Fatal error in ccfe:
when I ran a program which will cause the segmentation fault as root user
I am trying to evaluate the answer provided here , and am getting the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.