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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:43:24+00:00 2026-06-03T20:43:24+00:00

Using prepared statement i tried to insert values into table shows No column name

  • 0

Using prepared statement i tried to insert values into table shows No column name in email but it was clear i didnt missed email anywhere in my project.

RegistrationAcitivity.java

public void reg_submit(View v){

    DataHelper con=new DataHelper(this);
    GetterRegistration model=new GetterRegistration();

        SQLiteDatabase db = con.getWritableDatabase();

        **String sql="insert into registration(name,email,password)values(?,?,?)";**

        SQLiteStatement stmt = db.compileStatement(sql);

        stmt.bindString(1, model.getName());
        stmt.bindString(2, model.getEmail());
        stmt.bindString(3,  model.getPassword());           
        stmt.execute();
        db.close();
        Intent in = new Intent(this, CocomoActivity.class);
        startActivityForResult(in, requestCode);

}

}

DataHelper.java

 public class DataHelper extends SQLiteOpenHelper {
        public static final String TABLE_COMMENTS = "registration";
        public static final String id= "_id";
        public static final String name = "name";
        **public static final String email = "email";**
        public static final String password = "password";

        private static final String DATABASE_NAME = "mydb.db";
        private static final int DATABASE_VERSION = 1;

        // Database creation sql statement
        private static final String DATABASE_CREATE = "create table "
            + TABLE_COMMENTS + "( " + id
                + " integer primary key autoincrement, " + name
                + " text not null,"+email
                +"text not null," +password
                +"text not null)";

This was the Error report in Logcat

05-11 15:16:25.785: E/AndroidRuntime(704): at java.lang.reflect.Method.invoke(Method.java:507)
05-11 15:16:25.785: E/AndroidRuntime(704): at android.view.View$1.onClick(View.java:2139)
05-11 15:16:25.785: E/AndroidRuntime(704): … 11 more
05-11 15:16:25.785: E/AndroidRuntime(704): Caused by: android.database.sqlite.SQLiteException: table registration has no column named email: , while compiling: insert into registration(name,email,password)values(?,?,?)
05-11 15:16:25.785: E/AndroidRuntime(704): at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
05-11 15:16:25.785: E/AndroidRuntime(704): at android.database.sqlite.SQLiteCompiledSql.compile(SQLiteCompiledSql.java:92)
05-11 15:16:25.785: E/AndroidRuntime(704): at android.database.sqlite.SQLiteCompiledSql.(SQLiteCompiledSql.java:65)
05-11 15:16:25.785: E/AndroidRuntime(704): at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:83)
05-11 15:16:25.785: E/AndroidRuntime(704): at android.database.sqlite.SQLiteStatement.(SQLiteStatement.java:41)
05-11 15:16:25.785: E/AndroidRuntime(704): at android.database.sqlite.SQLiteDatabase.compileStatement(SQLiteDatabase.java:1149)
05-11 15:16:25.785: E/AndroidRuntime(704): at android.cocomo.login.RegistrationActivity.reg_submit(RegistrationActivity.java:45).

Any help will be appreciated . Thank you in Advance. Still Im trying to fix this if anyone suggestion Let me know friends

  • 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-03T20:43:27+00:00Added an answer on June 3, 2026 at 8:43 pm

    There is no space between email and text.

     **email+"text** not null," +...
    

    and between password and text

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

Sidebar

Related Questions

I'm trying to insert some Binary data into a MySQL database without using prepared
we have problem with slow insert statement using 40 bind variables as columns values.
I'm using a bit(1) field to store boolean values and writing into the table
I am using following prepared statement : Class.forName(com.mysql.jdbc.Driver); con=DriverManager.getConnection(jdbc:mysql://localhost:3306/mysql,root,root); String query=select ename from ?
I am trying to implement an update statement using a prepared statement in a
I am using the Informix.NET driver (C#) to insert a row into a database
I have a sqlite3 prepared statement. I know the number of values to bind
I'm using the Ruby Sqlite3 library to insert some records into a database. I'm
I'm new to using PDO and prepared statement so if I'm doing this blatantly
I am trying to do a simple insert into MySQL. I am using mysqli

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.