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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:45:08+00:00 2026-05-20T04:45:08+00:00

Hey all, I have the following problem. I recently added an extra column to

  • 0

Hey all, I have the following problem. I recently added an extra column to my database in SQLite and now it’s giving me a SQL logic error or missing database error I made the change to the database and deleted the virtual SD card on the BB simulator to delete the old database and allow the new one to be created on the simulator, the code of the function giving the problem is the following:

public Vector obtenerVoiceNotes() 
{
    Vector voiceNotes = new Vector();

    long id, idRemoto, duracion;
    byte[] audioArray;
    String nombre, comentario;

    try
    {
        // Se prepara la sentencia SQL
        Statement statement = _BD.createStatement("SELECT * FROM VoiceNote WHERE idUsuario = ?");
        statement.prepare();

        statement.bind(1, MainApp._user.getIdUser());

        // Se define un cursor para navegar por el resultado
        Cursor cursor = statement.getCursor();

        // Se itera sobre el cursor y se agrega al arreglo de notas 
        while(cursor.next())
        {
            Row row = cursor.getRow();

            id = row.getInteger(0);
            audioArray = row.getBlobBytes(1);
            nombre = row.getString(2);
            comentario = row.getString(3);
            idRemoto = row.getInteger(4);
            duracion = row.getInteger(5);

            long userId = MainApp._user.getIdUser();

            VoiceNote voiceNote = new VoiceNote(nombre, comentario, audioArray, userId);
            voiceNote.set_id(id);
            voiceNote.set_idRemoto(idRemoto);
            voiceNote.set_duration(duracion);

            voiceNotes.addElement(voiceNote);
        }

    }
    catch (DatabaseException e)
    {
        System.out.println();
        MainApp.messageDialog(e.toString());
    } catch (DataTypeException e) {
        // TODO Auto-generated catch block
        MainApp.messageDialog(e.toString());
    }

    // Se retorna el arreglo de notas obtenido
    return voiceNotes;
}

The exception happens on statement.prepare() this is the create statement for my table:

CREATE TABLE "VoiceNote" (
    "ID"         INTEGER PRIMARY KEY NOT NULL ,
    "Track"      BLOB,
    "Nombre"     VARCHAR(30) NOT NULL UNIQUE,
    "Comentario" VARCHAR(80),
    "idRemoto"   INTEGER     NOT NULL  DEFAULT -1,
    "Duracion"   INTEGER     NOT NULL  DEFAULT 0,
    "idUsuario"  INTEGER      NOT NULL  DEFAULT -1)

The new column is idUsuario if i revert the change there no longer is any problem, any ideas?

  • 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-20T04:45:08+00:00Added an answer on May 20, 2026 at 4:45 am

    Sounds like the database had been changed but not committed – meaning that the next query to the database would return a ‘corrupted’ state.

    Be sure to commit any changes – and make sure extreme changes like this if done on the fly are carried out on a locked database (don’t want any other pesky threads trying to access it!)

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

Sidebar

Related Questions

Hey all. I have, what appears to be, a trivial problem. I have the
hey all.i'm newbie at this problem.i have this data in table result: item range_code
Hey all, i'm having a little problem with ksoap2 and getting response i have
Hey all I am having a huge problem here evenafter following every step of
Hey all. I have the following code: http://jsfiddle.net/g7Cgg/ As you can see, there are
Hey all, have a slight problem here. In CakePHP I have a controller that
Hey all - I have an app where I'm authenticating the user. They pass
Hey all, I have something of an interesting requirement for my project. I need
Hey all. I have a server written in java using the ServerSocket and Socket
Hey there, i got this very annoying problem: I have a CheckBoxList getting items

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.