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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:43:31+00:00 2026-05-31T12:43:31+00:00

In my c# application i am trying to delete a record and i am

  • 0

In my c# application i am trying to delete a record and i am returning result of the executenonquery to check the deletion is exactly happening as below.

rowsAffected = db.ExecuteNonQuerySQL(
    @"DELETE FROM relation WHERE parent_itemid = " + SourceThingId + " AND " +
    "     child_itemid = " + ThingId + " AND " +
    "     relation_typeid = " + RelationTypeId);

And the executenonquery is definesd as below,

using (SQLiteTransaction dbtrans = conn.BeginTransaction())
{
    SQLiteCommand cmd = conn.CreateCommand();
    cmd.CommandText = sqlExpr;
    cmd.CommandType = CommandType.Text;
    ireturn = cmd.ExecuteNonQuery();
    dbtrans.Commit();
}
return ireturn;

But when i am executing its not deleting and the value returns 0.The databse used is sqlite.

Do any one have idea why it happens.Please help.

Thanx in advance.

  • 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-31T12:43:32+00:00Added an answer on May 31, 2026 at 12:43 pm

    Well it certainly sounds like the record simply isn’t there. You should debug this by running a SELECT * with the same query, and see whether you get any results back.

    You should also stop putting your values directly into SQL, and instead use parameterized SQL. That will give a better separation of code and data, avoid SQL injection attacks, and avoid conversion issues (particularly with date/time values).

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

Sidebar

Related Questions

I m trying to delete a record from a SQLiteDB via Android Application,This is
Am trying to delete row from core data base in ios application buts its
I am trying to delete all the temporary files created by my application during
I am trying to delete a specific directory from mY temp folder try {
I'm trying to delete blobs in an mvc 3 application that uses azure storage.
i have a problem. I am trying to delete something from a list but
I'm trying to execute stored procedure on SQL Server 2008 from C# application. It
I'm trying to query a SQL database from vbs but when no record is
I am trying to delete future appointments in my Outlook calendar, from Access VBA,
In my rails application I am trying to create a new user from a

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.