StorageEncoding and CollationAttribute
Beatrix Willius
bwillius at gmx.de
Wed Sep 13 12:14:52 CDT 2006
Hello,
next question about Valentina 2.
I want my databases to have a StorageEncoding of utf8 and the
CollationAttribute secondary. When I create a new database this
works, but old, converted databases are stubborn. They have
StorageEncoding utf16 and the CollationAttribute primary.
Part of the code follows:
'update to valentina 2
'theFolderitem is a folderitem and is the location of the database
if valentina.GetDatabaseVersion(theFolderitem) < &h200 then
'rename old file
dim OldFolderitem as FolderItem = theFolderitem
dim theName as String = OldFolderitem.Name
OldFolderitem.Name = OldFolderitem.Name + " Old"
'create new file
theFolderitem = nil
theFolderitem = OldFolderitem.Parent.Child(theName)
Valentina.Convert_1_2(OldFolderitem, theFolderitem, true, "", "")
end if
'make new database
ValentinaDB = new VDatabase
ValentinaDB.open(theFolderitem)
'make attachment table
if ValentinaDB.SchemaVersion = 2 then
'set database stuff
ValentinaDB.StorageEncoding = "UTF8"
ValentinaDB.CollationAttribute(EVColAttribute.kStrength) =
EVColAttributeValue.kSecondary
end if
Mit freundlichen Grüßen/Regards
Trixi Willius
http://www.mothsoftware.com
Mail Archiver X: archive, clean and search email
http://www.beatrixwillius.de
Fractals, 3d landscapes etc.
More information about the Valentina
mailing list