Closed myhobby-projects closed 1 month ago
sir,i have found the solution to my problem.once i create a new database using choice 1.then after that i am creating new table using choice 2.then i have to close the database immediately by using choice 4
now i can use choice 2 or choice 3 for inserting new rows into the table (which i had previously created )and i can also execute select query on the table(which i had created)
if i follow above procedure then i am not getting this error(SQL error: database disk image is malformed)
sir, i have used your sqlite3 library in Nodemcu 1.0(ESP-12E) . CONT_STACKSIZE is changed to 6144 bytes.my Nodemcu cpu frequency is 160MHz. i have set the spi_half_speed in sdfat_fns.cpp .
i have used this micro sd card module https://robu.in/product/micro-sd-card-module/
connections to sdcard module are correct and sdfat 2.2.3 does not have any problem in reading or writing text files. but sdfat-2.2.3 doesnt work at all with your sqlite3 library and creates stack exceptions. so i have used SdFat-2.0.3 version.
i have tested the sqlite3_console_sd sketch .
when i press choice 1 ,it creates the database name which i have give as input.
after that i have given choice 2,i have given sql query to create table.the operation is completed successfully.
after this i have selected choice 2 again and i have given sql query to insert values into table which i have previously created.it gives SQL error: database disk image is malformed .
after this i cant execute any more sql queries on that database.because it gives same error SQL error: database disk image is malformed .
i repeated above procedure with another database name,creation of table will be successful.but insert operation fails.i copied the databases which got created in sdcard into my computer.the sqlite databse browser software in my computer can open the copied database files and the table is present in the database and i can insert values into the existing table.
sir please help me in solving this problem,am i following the write procedure in creating database ?? as i didnt copy any database file from computer to the sd card .
i have used sdfat2.0.4 and sdfat 2.0.5,but there is no change in the error SQL error: database disk image is malformed .