1. Beatrix Willius
  2. Valentina Database ADK
  3. Sunday, March 08 2020, 11:10 AM
  4.  Subscribe via email
Did some retesting with loading a database dump of a medium sized database. From 5k records of the main table only 27 were loaded. I was able to identify the record and when I tried to load only the one record into Valentina Studio nothing was imported.

Code:

theDatabase.DumpEx(DumpFolderitem, DataFile, 1024, True, "UTF-16";)

and

newDatabase.LoadDumpEx(DumpFolderitem, DataFile, theFolderitem, "UTF-16";)

In Valentina Studio I get some warnings:

Load SQL Dump: Unexpected SqlExecute() exception: :

CREATE DATABASE IF NOT EXISTS "Mail Archive" WITH
SET PROPERTY
"Mode",
"IdentsCaseSensitive",
"SegmentSize",
"SchemaVersion",
"DateTimeFormat",
"DateSeparator",
"TimeSeparator",
"KeyDelimiter",
"LocaleName",
"StorageEncoding",
"FrenchCollation",
"AlternateHandling",
"CaseFirst",
"CaseLevel",
"NormalizationMode",
"Strength",
"HiraganaQuaternaryMode",
"NumericCollation"
of DATABASE TO
'kDscDatBlbInd',
false,
262144,
22,
'kMDY',
'/',
':',
'.',
'en_DE',
'UTF-16',
'kOff',
'kNonIgnorable',
'kLowerFirst',
'kOff',
'kOff',
'kSecondary',
'kOff',
'kOff'; :: Database with name "%S" must be opened or created before operation.
Load SQL Dump: Unexpected SqlExecute() exception: :


USE "Mail Archive"; :: Database with name "%S" must be opened or created before operation.
Load SQL Dump: Unexpected SqlExecute() exception: :


INSERT INTO "Message" ("MailboxID", "Username", "OriginatorFrom", "OriginatorSender", "OriginatorReplyTo", "ReceiverTo", "ReceiverCc", "ReceiverBcc", "InternalMessageID", "InternalInReplyTo", "InternalReferences", "InternalReceived", "InternalReturnPath", "MainDateTime", "MainTimeOffset", "MainSubject", "MainMailbox", "ResentFrom", "ResentSender", "ResentReplyTo", "ResentTo", "ResentCc", "ResentBcc", "ResentDateTime", "ResentTimeOffset", "ResentMessageID", "OtherStatus", "OtherPrecedence", "MIMEVersion", "ContentType", "ContentLength", "ContentTransferEncoding", "ContentID", "ContentDescription", "ContentDisposition", "ContentLanguage", "XMailer", "XUIDL", "XPriority", "XBulkmail", "XAttachments", "MessageBody", "MessageBodyHtml", "MessageRawData", "HeaderRest", "AttachmentCount", "MailTagsAll", "MailTagsPriority", "MailTagsKeywords", "MailTagsProject", "MailTagsAnnotation", "MailTagsTimestamp", "MailtagsMessageColor";) VALUES (2, '', 'André Bessot alp.b@bluewin.ch', '', '', 'Willius Beatrix mail@beatrixwillius.de', '', '', '<4749BF9A-7C28-4F19-AFF1-9AB4B7C25CC6@bluewin.ch>', '', '', 'from vimdzmsp-sfwd03.bluewin.ch (vimdzmsp-sfwd03.bluewin.ch [195.186.120.132]) by d167.x-mailer.de (Postfix) with ESMTPS id B2F1E41FD758 for <mail@beatrixwillius.de>; Sun, 3 Feb 2019 08:33:28 +0100 (CET) from [192.168.0.150] ([31.10.160.111]) by vimdzmsp-sfwd03.bluewin.ch Swisscom AG with SMTP id qCBYgSWyLloQUqCBZgXKsb; Sun, 03 Feb 2019 08:27:28 +0100', '<alp.b@bluewin.ch>', DATETIME'02/03/2019 08:33:28:000', '', 'Collectionneurs suisses', 'mails for parser sing', '', '', '', '', '', '', DATETIME'11/30/2002 00:00:00:000', '', '', '', '', '1.0 (Mac OS X Mail 12.2 \\(3445.102.3\\))', 'multipart/alternative; boundary="Apple-Mail=_5EE7CF66-16A8-42E5-B9E0-682186FDB39C"', LONG'0', '', '', '', '', '', 'Apple Mail (2.3445.102.3)', '', '', '', '', 'Cher Willy,Voici la suite, revue et complétée ainsi que son mode d\'emploi sous forme animée. Il manque des données concernant tes appareils notamment.J\'ai enregistré le fichier Excel sous 2 formats : 2016 et 1997-2004, heureusement les filtres fonctionnent de manière identique pour les deux.Bien amicalement,André
Collectionneurs CH 97-2004.xls
Collectionneurs CH2.mp4
Collectionneurs CH2.xlsx
André BessotCh. de Beaumont 66CH – 2502 Biel/Biennealp.b@bluewin.chwww.pbase.com/cendres
', $(0,132272), $(132272,9680646), $(9812918,3526), SHORT'3', NULL, SHORT'-1', '', '', NULL, DATE'11/30/0002', ''); :: Invalid parameter value.
Load SQL Dump: Unexpected SqlExecute() exception: :


INSERT INTO "Attachment" ("MailID", "AttachmentPath", "AttachmentData", "AttachmentPreviewData", "AttachmentName";) VALUES (1, '', $(9816444,65024), NULL, 'Collectionneurs CH 97-2004.xls'); :: Invalid parameter value.
Load SQL Dump: Unexpected SqlExecute() exception: :
INSERT INTO "Attachment" ("MailID", "AttachmentPath", "AttachmentData", "AttachmentPreviewData", "AttachmentName";) VALUES (1, '', $(9881468,7069759), NULL, 'Collectionneurs CH2.mp4'); :: Invalid parameter value.
Load SQL Dump: Unexpected SqlExecute() exception: :
INSERT INTO "Attachment" ("MailID", "AttachmentPath", "AttachmentData", "AttachmentPreviewData", "AttachmentName";) VALUES (1, '', $(16951227,26002), NULL, 'Collectionneurs CH2.xlsx'); :: Invalid parameter value.
Reindex of : MailboxID
Reindex of : MailID


Am I doing something wrong? Is this a bug? Can I get those warnings in the Xojo code, too?
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
Oh, I always created the database on the disk before I loaded the SQL dump. However, your example makes a hard crash with a different storage type: http://www.valentina-db.com/bt/view.php?id=8747 .
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 1
Beatrix Willius Accepted Answer
I'll check that out.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 2
Ivan Smahin Accepted Answer
If you mean how to enable warnings in V4RB -


mDatabase.SqlExecute("set property WarningMode to 1")
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 3
Ivan Smahin Accepted Answer
It works on my side using Examples/API_way/Dump_SQL_Database/Dump_SQL_Database.xojo_binary_project
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 4
Beatrix Willius Accepted Answer
Here is the dump file: http://www.mothsoftware.com/downloads/dump.zip . I haven't a clue what you want me to check.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 5
Ivan Smahin Accepted Answer
Probably the dump-data file is different from the file created by DumpEx.
You may check it yourself -

$(0,132272), $(132272,9680646), $(9812918,3526),

The file length must be greater then 9812918 + 3526 bytes.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 6
Ivan Smahin Accepted Answer
So, I need that dump files to test it here, since every related test is passed ok.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 7
Beatrix Willius Accepted Answer
No to both. I'm using LoadDumpEx and I'm passing a data file.


dim DataFile as FolderItem = DumpFolderitem.Parent.Child(kDumpDatafile)
if DataFile = Nil or not DataFile.Exists then
Globals.theErrorLog.DialogErrorProceed(Replace(kErrorDatafileMissing, "<<filename>>", DumpFolderitem.Name))
Return Nil
end if

'load the dump
dim EverythingOkay as Boolean = true
try
newDatabase.LoadDumpEx(DumpFolderitem, DataFile, theFolderitem, "UTF-16")
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 8
Ivan Smahin Accepted Answer
"Invalid parameter value" error - it is because of values like this one - $(0,132272).
Such values are sort of "file-binding" - the feature, introduced in v.9.1 to avoid inlining huge BLOB's data directly into the SQL-dump but do it with some reference to the external data-file.
I guess you forget to pass that data-file ref or call LoadDump instead of LoadDumpEx.

roducts:adk:api:vdatabase_class:dump_methods&" target="_blank" rel="nofollow">https://valentina-db.com/docs/dokuwiki/v10/doku.php?id=valentina:products:adk:api:vdatabase_class:dump_methods&;s[]=dump#vdatabase.dumpex
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 9
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.