Insert Record to Existing Table Fails

Issue #73 duplicate
Former user created an issue

Originally reported on Google Code with ID 73

What steps will reproduce the problem?
1. Create table inside database with one or more records then leave table level.
2. Go back to table and click on Insert tab to insert new record.
3. After taking form input, the system alerts with an error.

What is the expected output? What do you see instead?
The new record should be accepted.  Error message instead.

What version of the product are you using? On what operating system?
1.9.0  Using on Windows XP.

Please provide any additional information below.

Reported by nevadatex7 on 2011-12-09 21:30:59

Comments (7)

  1. Former user Account Deleted

    ``` Can you be more specific? 'An error' is not very helpful in finding the cause. ```

    Reported by `jos.grootlipman` on 2011-12-12 19:05:57

  2. Dane Iracleous

    ``` I'll give you a few days to explain the issue in more detail. Otherwise, I'm going to mark this as an invalid issue report. Following your steps, the issue is not reproduced. Inserting a record into a table is a very common task that users perform every day, so there must be something specific about how you are doing it that is causing the error. Please describe everything about what you are doing including the name of the table, the columns and their data types, etc... and the exact message of the error. ```

    Reported by `diracleo` on 2011-12-16 05:22:30

  3. Former user Account Deleted

    ``` I discovered that my database was SQLite 3 instead of 2 and didn't like procedural code. ```

    Reported by `nevadatex7` on 2011-12-16 20:42:35

  4. Former user Account Deleted

    ``` Please disregard last response. It was intended for another help desk.

    Here are the steps I am taking on an existing database (SQLite 2.8.17)(Attached). I go to the table view and click on the Insert Tab. I fill out all the fields in the form. I click the Insert button at the bottom of the form. Up pops the error message.

    Insert works fine on a SQLite 3 database created in your application. Is this possibly a limitation with SQLite 2? I can read SQLite 2 created in another application but cannot modify records in phpLiteAdmin?

    I notice that your application defaults to creating SQLite 3 databases. Is there a way to change a setting to allow it to create a SQLite 2 database or is that not possible? ```

    Reported by `nevadatex7` on 2011-12-16 20:57:09

  5. Dane Iracleous

    ``` If your system has SQLite2 installed, the database will be version 2. If SQLite3, then the database will be version 3. Your system can only have one of the two. phpLiteAdmin will determine the version and create the appropriately versioned database.

    I am still not able to reproduce your issue. Inserting records into an SQLite2 database works fine for me. ```

    Reported by `diracleo` on 2012-06-02 09:26:32 - Status changed: `Accepted`

  6. Christopher Kramer

    ``` It is not true that you cannot handle two versions of SQLite on one system.

    This depends on the PHP extensions: If you only have either SQLiteDatabase or SQLiteDatabase3, you can only handle one version. But if you have both, or if you have PDO, you can handle both versions.

    You can create SQLite version 2 database with phpLiteAdmin by setting the FORCETYPE constant like this: define("FORCETYPE", "SQLiteDatabase"); You create a new database and afterwards reset it to false. Then you can handle both the SQLite 2 database and other SQLit3 databases with phpLiteAdmin.

    Of course this only works, if the SQLiteDatabase extension is installed on your system, which it is not anymore on recent debian php packages. Beginning with PHP 5.4, the old extension is only available via PECL.

    Maybe we should add a GUI option for this (creating version 2). But version 2 is deprecated anyway.

    Concerning the bug: Have you tried phpLiteAdmin version 1.9.2? I guess this is another example of issue #75 here, so it should be fixed in 1.9.2. ```

    Reported by `crazy4chrissi` on 2012-06-02 20:59:31

  7. Christopher Kramer
    As said, I guess this was another example of issue #75. I'll merge it into that one.
    

    Reported by crazy4chrissi on 2012-11-06 15:00:12 - Status changed: Duplicate - Merged into: #75

  8. Log in to comment