Hi Tim.
My stupidity is showing.
I went and did what you said in the pseudo-code, and this is what happens.
[quote]First. made a copy of my database (DUH. I’m stupid, but not THAT stupid)
Verified with Textedit (Mac User here) and I could read all of the the text, in clear text.
Ran my program with your steps (as I think they should be from what I read.
Got my data filling in my listbox. Yay
Closed the debug.
Checked the file.
Now looks like exploded lawn furniture. Again, yay.[/quote]
Run the program to load the file, open the database… nothing.
So, did the following:
Ran a debug with breaks…
[quote]Open
Select my file with open dialog
dbfile is not nil
Last Error = 0
Get DB.Connect
And here is where it is interesting,
It jumps right down into the else to get the encryption key.
Added DB.Decrypt and still the box never fills in.[[/quote]
Here is the code as it stands now.
[code]Dim dbfile as FolderItem
dbfile = GetOpenFolderItem("")
if dbfile <> NIL then
DB = New SQLiteDatabase
DB.DatabaseFile = dbfile
if DB.Connect then
DB.EncryptionKey = “howdyDoody”
DB.Encrypt
AddPassword.Enabled = True
ChangePassword.Enabled = True
DeletePassword.Enabled = True
LoadPasswords 'this is so that I can load my database. this will be a method, but I haven't done it yet
Self.Title = "Passwords (" + dbfile.Name + ")"
else
DB.EncryptionKey = "howdyDoody"
DB.Decrypt
end if
end if[/code]
Update: I don’t believe it, but this code seems to work!
[code]Dim dbfile as FolderItem
dbfile = GetOpenFolderItem("")
if dbfile <> NIL then
DB = New SQLiteDatabase
DB.DatabaseFile = dbfile
DB.EncryptionKey = “howdyDoody”
DB.Decrypt
if DB.Connect then
AddPassword.Enabled = True
ChangePassword.Enabled = True
DeletePassword.Enabled = True
LoadPasswords 'this is so that I can load my database. this will be a method, but I haven't done it yet
Self.Title = "Passwords (" + dbfile.Name + ")"
else
DB.EncryptionKey = "howdyDoody"
DB.Decrypt
end if
end if[/code]
If anyone sees any possible catastrophies waiting to occur, would be appreciated.
Regards