adrianhudson 0 Posted July 17, 2019 Hi, I have an autotoit script with _SQLite_open() that works when compiled but gets @error=1 and @extended=3 when run from scite. @extended=3 is "Access permission denied". As you can see, its pretty bog standard stuff. Does anyone know why this is please? _SQLite_Startup() If @error Then MsgBox(16, "SQLite Error", "SQLite3.dll Can't be Loaded") Exit -1 EndIf Global $db1 = _SQLite_Open("viewer2.db", $SQLITE_OPEN_READWRITE) If @error Then MsgBox(16, "SQLite Error", "Can't open viewer2.db " & @error & " " & @extended) Exit -1 EndIf Share this post Link to post Share on other sites
Nine 992 Posted July 17, 2019 Could be a question of version, make sure you got latest version of all softwares and FULL scite version. You may also want to copy both Sqlite.dll (x86 and x64) locally with your script and .db. And use _SQLite_Startup("sqlite3.dll", False, 1) see if that works... Not much of a signature but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Multi-keyboards HotKeySet Fast and simple WCD IPC GIF Animation (cached) Share this post Link to post Share on other sites
adrianhudson 0 Posted July 17, 2019 Thank you Nine. I have downloaded and reinstalled Autoit and scite. Versions 3.3.14.5 and 4.1.2 respecively. Tested again with same results. Added the _SQLite_Startup("sqlite3.dll", False, 1) as recommended and tested again. Same results. Downloaded a new 32bit SQLite.dll and put it in the same folder as the script and db (it was there already but a slightly older version). Same results. Regarding the 64 bit dll, it has the same name as the 32bit dll so can only have one or the other. Have tried each, one at a time, same results. I'm stumped! I'm going to copy the whole lot to another PC. Will update you on the results. Share this post Link to post Share on other sites
Nine 992 Posted July 17, 2019 (edited) x64 version must be called sqlite3_x64.dll, otherwise it won't work...and x86 version must be called sqlite3.dll Make sure you haven't mix them up ! Edited July 17, 2019 by Nine Not much of a signature but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Multi-keyboards HotKeySet Fast and simple WCD IPC GIF Animation (cached) Share this post Link to post Share on other sites
adrianhudson 0 Posted July 17, 2019 Sorry, my typo on the 32bit dll. Its name was correct. I have copied the 64bit dll as sqlite3_x64.dll and retested. No change. Will work compiled but not from within scite. I have copied all to another PC. All works perfectly. So, it is something to do with the PC. (File system permissions on the folder and files within are all identical between the PCs). Not sure what else to compare. I will deinstall everything and reinstall. Any other thoughts gratefully received. Share this post Link to post Share on other sites
adrianhudson 0 Posted July 17, 2019 Deinstalled. Reinstalled. Same result. Completely stumped. It has not set the default associations (I asked for double click to open script rather than running it) and it has not installed the right-click->New->Autoit Script shorcuts. Something very odd with the PC. Share this post Link to post Share on other sites
Nine 992 Posted July 17, 2019 11 minutes ago, adrianhudson said: Deinstalled. Reinstalled. Same result. Completely stumped. It has not set the default associations (I asked for double click to open script rather than running it) and it has not installed the right-click->New->Autoit Script shorcuts. Something very odd with the PC. Some ppl had a similar problem as you in the past. It was something related to PC configuration coming from a corporate image. If this is your case, a fresh install of windows from CDs may solve your issues. Not much of a signature but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Multi-keyboards HotKeySet Fast and simple WCD IPC GIF Animation (cached) Share this post Link to post Share on other sites
jchd 1,514 Posted July 17, 2019 Make sure to specify the full path to the DB file. In your first post snippet, the DB file has to reside in the same folder as the .au3 source file. Also check permissions for the DB folder. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Share this post Link to post Share on other sites
adrianhudson 0 Posted July 17, 2019 @nine: Many thanks. I think a reinstall of Windows is indeed worth a try. @jchd: Thanks for the suggestion but the DB is in the folder already (and the script works fine on another pc) Share this post Link to post Share on other sites
Skysnake 78 Posted July 17, 2019 Is you Scite and EXE running at the same execution level? Scite as Windows Guest and EXE as Admin (?) Or some such? Skysnake Why is the snake in the sky? Share this post Link to post Share on other sites