viewtopic.php?t=73046&hilit=sqlcipher
https://www.purebasic.fr/german/viewtopic.php?t=33021 German Forum
I ask the same question here in english forum as well
I use SQLite Database for a long time. Everything is working fine. I startet to change SQLite to ciphered version and included the sqlciper.dll library. On my development system it is woking fine. As soon I copy the executable file to a third party PC I run in problems.
Of cource the sqlcipher.dll is within the program directory.
Code: Select all
UseSQLiteDatabase("sqlcipher.dll")
EnableExplicit
Define mydir.s, found.i,result.s
;
found = 0
ExamineDirectory(0,GetCurrentDirectory(),"*.db3")
While NextDirectoryEntry(0)
If DirectoryEntryType(0) = #PB_DirectoryEntry_File
If DirectoryEntryName(0) = "test.db3"
found = 1
EndIf
EndIf
Wend
FinishDirectory(0)
If found = 0
CreateFile(0,"test.db3")
CloseFile(0)
EndIf
;
If OpenDatabase(0,"test.db3","","",#PB_Database_SQLite)
DatabaseUpdate(0,"PRAGMA key = 'passkey';")
FinishDatabaseQuery(0)
If found = 0
DatabaseUpdate(0,"CREATE TABLE test (field1 INTEGER,field2 INTEGER);")
DatabaseUpdate(0,"INSERT INTO test (field1,field2) VALUES (1,1),(2,2),(3,3);")
DatabaseQuery(0,"SELECT * FROM test;")
While NextDatabaseRow(0)
result + GetDatabaseString(0,DatabaseColumnIndex(0,"field1")) + " , " + GetDatabaseString(0,DatabaseColumnIndex(0,"field2")) + Chr(10)
Wend
FinishDatabaseQuery(0)
MessageRequester("Hinweis",result)
Else
DatabaseQuery(0,"SELECT * FROM test;")
While NextDatabaseRow(0)
result + GetDatabaseString(0,DatabaseColumnIndex(0,"field1")) + " , " + GetDatabaseString(0,DatabaseColumnIndex(0,"field2")) + Chr(10)
Wend
FinishDatabaseQuery(0)
MessageRequester("Hinweis",result)
EndIf
Else
MessageRequester("Hinweis","Open Error: " + DatabaseError())
EndIf
CloseDatabase(0)

To me it looks like the library is not included. Unfortunately there is no Return value using UseSQLiteDatabase() command
Does someone have the same effect?
Does someone have Ideas what may happen?
Or in perfect case can give a solution
Thanks
// Moved from "Tricks 'n' Tips" to "Coding Questions" (Kiffi)