Getting data from simple SQLite table returns NULL
-
i'm used to MySQL, this is...different. A table with just one row Using "DB Browser for SQLLite"...structure CREATE TABLE "appinfo" ( "version" TEXT NOT NULL, "passworded" INTEGER NOT NULL, "username" TEXT NOT NULL ); I added a row. "1", 1, "Admin" with DB Browser when I query it "SELECT * FROM addinfo;" with DB browser I get NULL for each field (blank on my c# app) what am I missing here? thanks
-
i'm used to MySQL, this is...different. A table with just one row Using "DB Browser for SQLLite"...structure CREATE TABLE "appinfo" ( "version" TEXT NOT NULL, "passworded" INTEGER NOT NULL, "username" TEXT NOT NULL ); I added a row. "1", 1, "Admin" with DB Browser when I query it "SELECT * FROM addinfo;" with DB browser I get NULL for each field (blank on my c# app) what am I missing here? thanks
-
no, that wasn't a copy & paste, it was a misspelling here, when I actually do it from my c# app it returns the column names (found a function to easily present col names and row data, so the columns are correct), and one row of empty data, just like in DB Browser I just tried SELECT * FROM "main"."appinfo"; it returned , 0, the middle number is supposed to be a 1
-
no, that wasn't a copy & paste, it was a misspelling here, when I actually do it from my c# app it returns the column names (found a function to easily present col names and row data, so the columns are correct), and one row of empty data, just like in DB Browser I just tried SELECT * FROM "main"."appinfo"; it returned , 0, the middle number is supposed to be a 1
I'm having trouble parsing your query! I would presume that "Main" is your database and is included in your connection string. If so then your query string should be "Select * from appinfo" and it should return the 1 record you have inserted. If you want an empty datatable then "Select * from Appinfo where 1=1"
Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP
-
I'm having trouble parsing your query! I would presume that "Main" is your database and is included in your connection string. If so then your query string should be "Select * from appinfo" and it should return the 1 record you have inserted. If you want an empty datatable then "Select * from Appinfo where 1=1"
Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP
no this is from DB Browser, not even the app
-
no this is from DB Browser, not even the app
Nevermind. I inserted it into the database with a query in DB Browser instead of using the browser and it seemed to work :shrug: thanks for putting up with me
-
no, that wasn't a copy & paste, it was a misspelling here, when I actually do it from my c# app it returns the column names (found a function to easily present col names and row data, so the columns are correct), and one row of empty data, just like in DB Browser I just tried SELECT * FROM "main"."appinfo"; it returned , 0, the middle number is supposed to be a 1