FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Bug]: Cannot add data to a table which exists · Issue #4169 · sqlitebrowser/sqlitebrowser · GitHub

[Bug]: Cannot add data to a table which exists #4169

Description

What did you do?

I have an issue where I can create new rows for some tables using slqitebrowser but it does not work for others.

I used sqlitebrowser to add records to a table called Competency using SQL from within sqlitebrowser. I added a record to the User table using the GUI.

I want to add a new row to a table called Evidence and it will use records from the tables mentioned previously as foreign keys.

Check that the table exists using select * from sqlite_schema;.

Result of this shows:

type name tbl_name rootpage sql
table Evidence Evidence 7 CREATE TABLE "Evidence" ( "Id" INTEGER, "User_Id" INTEGER, "Competency_Id" INTEGER, "Evidence" TEXT, "Complete" INTEGER NOT NULL DEFAULT 0 CHECK("Complete" >= 0 AND "Complete" <= 1), PRIMARY KEY("Id" AUTOINCREMENT), CONSTRAINT "Competency_Id_FK" FOREIGN KEY("Competency_Id") REFERENCES "", CONSTRAINT "User_Id_FK" FOREIGN KEY("User_Id") REFERENCES "User"("Id") )

Attached the database in sqlitebrowser and ran the following SQL:

insert into evidence(User_Id, Competency_Id) values (1,3);

What did you expect to see?

I expected that I would be able to add a new record to the Evidence table.

What did you see instead?

Result of this query is

Execution finished with errors. Result: no such table: main. At line 5: insert into evidence(User_Id, Competency_Id) values (1,1);

Open sqlite command line interface. Same command completes successfully.

Open sqlitebrowser and I can see the data but cannot update or delete it using SQL from the application.

DB4S Version

3.13.1

What OS are you seeing the problem on?

MacOS

OS version

MacOs Tahoe v26.5.2

Relevant log output

Prevention against duplicate issues

  • I have searched for similar issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL