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

The Archive Base Latest Questions

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

When I run my code, Unable to start activity ComponentInfo: android.database.sqlite.SQLiteException: near /: syntax

  • 0

When I run my code,
Unable to start activity ComponentInfo: android.database.sqlite.SQLiteException: near “/”: syntax error..

Why it doesn’t work?
Thankyou all in advance..
Here is my helper class

public class Helper extends SQLiteOpenHelper{

public static final String MYDATABASE_TABLE = "Restaurant";
public static final String KEY_ID = "_id";
public static final String KEY_CONTENT1 = "Restaurant name";
public static final String KEY_CONTENT2 = "Ac/non ac";
public static final String KEY_CONTENT3 = "Total chairs";
public static final String KEY_CONTENT4 = "Reserved chairs";
public static final String KEY_CONTENT5 = "Date";
public static final String KEY_CONTENT6 = "fromTime"; 
public static final String KEY_CONTENT7 = "toTime"; 
public static final String KEY_CONTENT8 = "Name";
public static final String KEY_CONTENT9 = "Contact Number";
public static final String KEY_CONTENT10 = "Table id";


private static final String SCRIPT_CREATE_DATABASE =
      "create table " + MYDATABASE_TABLE + " ("
      + KEY_ID + " integer primary key autoincrement, "
      + KEY_CONTENT1 + " text not null, "
      + KEY_CONTENT2 + " text not null, "
      + KEY_CONTENT3 + " integer not null, "
      + KEY_CONTENT4 + " integer not null, "
      + KEY_CONTENT5 + " text not null, "
      + KEY_CONTENT6 + " text not null, "
      + KEY_CONTENT7 + " text not null, "
      + KEY_CONTENT8 + " text not null, "
      + KEY_CONTENT9 + " text not null, "
      + KEY_CONTENT10 + " text not null) ";


public Helper(Context context, String name, CursorFactory factory,
        int version) {
    super(context, name, factory, version);
    // TODO Auto-generated constructor stub
}

@Override
public void onCreate(SQLiteDatabase db) {
    // TODO Auto-generated method stub
    db.execSQL(SCRIPT_CREATE_DATABASE);

}

@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    // TODO Auto-generated method stub

}
  • 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-31T16:43:07+00:00Added an answer on May 31, 2026 at 4:43 pm

    Table and column names in SQLite cannot have / in them, and you’re trying to call a column Ac/non ac.

    The support for special characters in table and column names in SQLite is a bit sketchy overall, so I’d also recommend using replacing your spaces in the column names with _. The alternative is to enclose them in quotes, but that may/may not work depending on SQLite version.

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

Sidebar

Related Questions

i need run code that will create a database and populate tables. i am
I have written an Android application that uses SQLite database which is saved in
how can i run code when an application ends with asp.net mvc ?
Our product contains a task-manager system that allows applications to run code in a
As a best practice, do you run code analysis on both debug and release
Taking the jQuery framework for example, if you run code like this: $(document).ready(function init()
When I run this code the selected item is not visible. I've already tried
I often run into code that has to perform lots of checks and ends
when i run this code : CONADefinitions.CONAPI_FOLDER_INFO2 FolderInfo; int iResult = 0; IntPtr Buffer
I like to run some code when a user closes my ms 2000 app.

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.