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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:17:44+00:00 2026-05-27T00:17:44+00:00

My application is in C. I have to add a functionality in my application

  • 0

My application is in C. I have to add a functionality in my application so that it should be able to upgrade itself according to the latest version. More specifically it should recognize if any newer version is found and get updated with that newer version (according to
the new executable). There may be situations like schema of database may get changed in the newer version. So what provision can I give in my code so that it can recognize the new executable and upgrade itself according to that?

Platform: linux, gcc compiler

  • 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-27T00:17:44+00:00Added an answer on May 27, 2026 at 12:17 am

    So you can update your binary as proposed by @Joachim and @awoodland above. While both are valid, I would err on the side of caution and simply get your package management tool to do the donkey work. Reasons being security and more critically to resolve dependencies. Unfortunately this requires you to maintain packages however given that you probably could get away with a deb file and an rpm file and cover the vast majority this is no biggy.

    On the database upgrade side, create a SQL script that backup the db and one (or a series) to update it (adding the appropriate fields etc.)

    Have your script create a database version table with the version number date and time of upgrade and the software revision number that performed the upgrade and whether it succeeded or not (anything you can think that is useful. Also make sure it inserts a row into your version table every time you upgrade.

    When you start your binary program get it to check the maximum version number against the expected db version to ensure that the binary is compatible with the database version else upgrade.

    Extending this further you can upgrade between vastly different versions by having it loop through a set of upgrade scripts. You should keep these as an embedded resource if you want to keep them safe(r) from prying eyes but this should resolve your problem.

    Hope this helps, I haven’t had my coffee yet but it may point to a solution. Going a step further you could also create an upgrade log table to record how the upgrade went and if any problems were encoutered, to help in those situations that hopefully will never happen.

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

Sidebar

Related Questions

We have subclassed the Silverlight Application class to add some additional functionality and then
I'd like to have my application be able to add bookmarks to safari programmatically,
I have an already built application and I want to add a feature that
We have a Silverlight application that uses WCF Data Services. We want to add
I have developend a window application(Win32 API) in visual C++. I have to add
I want to add a thumbnail picture viewer to my application.I have been trying
To execute my application in iPhone first of all I have to add provisioning
I have an application written in java, and I want to add a flash
Suppose I have some application A with a database. Now I want to add
I have a need to add business reporting for an application I am working

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.