-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL command cannot be executed - Error: File is encrypted or is not a database. #5
Comments
It seems to be because of changes in the dependent library SdFat. It works fine if I downgrade it to 1.0.7. |
Ji, whenever I download any db from the github (or) esp8266 sqlite3; In the properties of the db shows the following message as This file came from another computer and might be blocked to help protect this computer. "May be that be the reason for can't open the database" |
Oh gosh, correct, on the point, the downgrading to 1.0.7 fixes the problem completely. Yeah I had tested the cont.h before, from 7 or was it 8 bytes the ESP doesn't start anymore. Yes the removing dependencies is a good idea. The only question is, it's possible without SD library. I don't know the details yet, I'm only working rigth now 3 weeks with the ESP's and co. But maybe it's possible to get the opened file handle, so every library could be used to access the file system. |
@kabilramar, I really don't understand what you want to say or ask, but is this the return error message of the SQL command or simply from the system's downloader. You should describing your problem in more detail and exclude any errors that might be caused by other thinks. First check if the SD card can be read or files can be opened. |
Yes man I could read or write text file in sdcard interfacing nodemcu. |
@ts-abc and I am using a Catalex Micro Crad Adapter instead of wemos Micro Shield |
@siara-cc is it necessary to use only Wemos sd shield and not catalex micro adapter |
@siara-cc I read you ESP32 in Hackster io It was so nice. This is the connection for ESP32 which i have referred in Hackster.io
Can you please mention the wiring connection for esp8266 and micro SD card shield |
Can I change mount(Sd0/Ss) to mount (sd0/8 ) |
If you have free time please publish it as an video it will be more useful for easy understanding |
@kabilramar I am not sure about catalex adapter
@raghuram-bala please see the example sdfat to find out how the SS pin can be changed
I may be a good idea to make a video. Presently I am unable to spare much time for this. |
I would like to point out that given the limited RAM on ESP8266 and even ESP32, it would be a challenge to get a project working, even if you manage to solve the connection issues. It was difficult to get the examples working, especially on esp8266. Only pagesize 512 would work that too with without row id option and good index design. Insert frequency and Memory fragmentation is to be considered. |
@ arun Thank you arun |
@ arun it means D8 of the Wemos Mini Shield to be connected to SS pin on the SD Card Shield "Is it right sir" |
@ arun Please use a page size of 512 using the commands PRAGMA page_size=512; VACUUM; |
The file gets corrupted sometimes. I assume it is because of power disconnection when write happens. I am not sure. I suggest copy the file again, try the example sketch first using the clone of the present repo and then modify from there. |
I first tried the sdfat example, then the console_spiffs, as last the db_small example. All of them show the same Error, "file is encrypted or is not a database".
Monitor output in last db_small:
Opened database successfully
Failed to fetch data: file is encrypted or is not a database<br><br><a href='/'>back</a>
What can I try, better how do I solve this problem. Databases are definitely in order, all can be opened from the SD card and queried.
The text was updated successfully, but these errors were encountered: