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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:12:50+00:00 2026-06-03T14:12:50+00:00

From the documentation and this post I know execSQL() executes a single SQL statement

  • 0

From the documentation and this post I know execSQL() executes a single SQL statement that is not a SELECT or any other SQL statement that returns data. It is also mentioned that execSQL() should not be used for inserting.

But I’m using execSQL() for inserting like:

db.execSQL("INSERT INTO LIST VALUES('খবর');"); //where LIST is a table

This is working perfectly for me (there is no SELECT statement with this INSERT), but I was told not to use this here.

So, my question is: does the INSERT statement return a value even though there is no SELECT statement attached to 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-06-03T14:12:52+00:00Added an answer on June 3, 2026 at 2:12 pm

    You can use it, it is just not recommended because you won’t receive any information that might be generated by the DB. The methods you are supposed to use return codes/cursors/other info to let you know what happened so you can deal with them if there is a problem.

    The key is this line in the execSQL docs:

    It has no means to return any data (such as the number of affected rows). Instead, you're encouraged to use insert...
    

    The important word there is “encouraged”. You can use execSQL for any SQL command, but you get no feedback on the process, which makes it rather dangerous to use for something where you should get feedback (unless you don’t care than an insert failed, or only 2 of 5 records got updated).

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

Sidebar

Related Questions

I couldn't find anything about this in MySQL documentation. SELECT accesion_id, definition FROM accesion_table
I know that there's another post about this but, I've a different error than
Sorry if this is a dead simple question but I'm confused from the documentation
From this page: http://www.doctrine-project.org/documentation/manual/1_2/en/working-with-models#dealing-with-relations:creating-related-records You can see that it says $obj['property']; is the recommended
From the isKindOfClass: method documentation in NSObject: Be careful when using this method on
I wondering is there an equivalent of this feature from play framework http://www.playframework.org/documentation/2.0/JavaAsync Basicly
I ran the code to create the generically related objects from this demo: http://www.djangoproject.com/documentation/models/generic_relations/
I am not clear from the documentation - when I indicate a cell width
So I came across this post about accessing CRM data from an external application.
I'm having the opposite issues of this post . It seems that roxygen is

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.