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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:59:02+00:00 2026-06-16T08:59:02+00:00

This code is to create a new table. import android.database.sqlite.SQLiteOpenHelper; import android.content.Context; import android.database.sqlite.SQLiteDatabase;

  • 0

This code is to create a new table.

 import android.database.sqlite.SQLiteOpenHelper;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;


public class MySQLHelper extends SQLiteOpenHelper {

    public static final String DATABASE_NAME = "verlaufAufgaben.db";
    public static final int DATABASE_VERSION = 1;

create the table

    private static final String TABLE_CREATE_VERLAUF = ""
            +"create table VERLAUF ("
            +" ID integer primary key, "
            +" Zahl1 int,) ";


    public MySQLHelper(Context context) 
    {   
        super (context, DATABASE_NAME, null, DATABASE_VERSION);
    }

create SQLiteDatabase

    @Override
    public void onCreate(SQLiteDatabase database)
    {
        database.execSQL(TABLE_CREATE_VERLAUF);
    }

upgrade the database

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
    {
        Log.w(MySQLHelper.class.getName(),
                "Upgrading database from version " + oldVersion + "to "
                + newVersion + ", which all destroy all old data");
        db.execSQL("DROP TABLE IF EXISTS SCANITEM");
        onCreate(db);
    }

}

What’s wrong in this code, it shows me an error because of the table?

  • 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-16T08:59:03+00:00Added an answer on June 16, 2026 at 8:59 am

    you had the table create DDL ending with a comma…remove that!

    private static final String TABLE_CREATE_VERLAUF = ""
            +"create table VERLAUF ("
            +" ID integer primary key, "
            +" Zahl1 int) ";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some simple code which should create a database. package com.webfoo.android.databaseExample; import android.app.Activity;
Hola check this code. var watch = new Stopwatch(); watch.Start(); var request = HttpWebRequest.Create(new
I have this code to create an ATOM feed Dim xmlResult As New StringBuilder
Having this code: using (BinaryWriter writer = new BinaryWriter(File.Open(ProjectPath, FileMode.Create))) { //save something here
Consider this bit of obfuscated code. The intention is to create a new object
Here is my code for my db class: package one.two; import java.util.List; import android.app.ListActivity;
Possible Duplicate: how to store image in sqlite database this is my code for
I have an array created with this code: var widthRange = new Array(); widthRange[46]
I have this function in a Code Igniter model that creates a new video.
Why, this code create 2 the same columns in grid (Color and Color). How

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.