1. Stan Busk
  2. Valentina Database ADK
  3. 土, 8月 29 2020, 07:34 AM
  4.  メールで購読
A customer sent me a Valentina database that seems corrupt. It is very slow to load but I can finally do it with the software that created it. However, Valentina Studio says it is not a valid database.

Where can I sent that database so it can be checked?
コメント
There are no comments made yet.
Stan Busk 承諾済みの回答
Ok, thanks, I have reassigned the field with the correct value and all is fine now!
コメント
There are no comments made yet.
Ivan Smahin 承諾済みの回答
Select recid, .... From ...
Select ** from ...
コメント
There are no comments made yet.
Stan Busk 承諾済みの回答
Good point, yes, Transaction_Record is supposed to contain a copy of RecID.

In a VCursor how can I get the RecID or a record?
コメント
There are no comments made yet.
Ivan Smahin 承諾済みの回答

SELECT recID FROM tblTransactions WHERE Transaction_Record = '176744'
-- 176446


And RecordExists( 176446 ) returns true as expected.
コメント
There are no comments made yet.
Ivan Smahin 承諾済みの回答
Ok, as far as I get it - you think that tblTransactions.recID == tblTransactions.transaction_Record ?

See PushButton3.Action


...
aRec = aCursor.ULongField( "Transaction_Record" ).Value
...
myDatabase.mTransaction.Change( _
myDatabase, _
aRec, _
...



myDatabase.mTransaction.Change(
inDatabase as DB_Data, inRec As Integer, inTransactionType As Integer, inCustomType As string, inDebitAccount As Integer, inCreditAccount As Integer, inAmount As Double, inComment As String, inDay As Integer )
...
If isValid( inRec ) then
...




isValid(inRec As Integer)
...
If RecordExists( inRec ) then
...
コメント
There are no comments made yet.
Stan Busk 承諾済みの回答
Sorry, the file has been updated and re-uploaded here is the new link: https://jmp.sh/BRlXjec
コメント
There are no comments made yet.
Ivan Smahin 承諾済みの回答
moValentinaTools Missing File '..\..\..\..\_libraries\Modules\moValentinaTools.rbo' /Users/Maxprog/Developments/_libraries/Modules/moValentinaTools.rbo
コメント
There are no comments made yet.
Stan Busk 承諾済みの回答
Here is a minimalist Xojo project you just have to load and run, I hope: https://jmp.sh/yI2s4VP
Button 1 just run the query in the edit field.
Button 2 do a VTable.RecordExists() for records 131017 To 181284, 38175 records are returned as not valid but with the query field you can check they are in the DB.
Button 3 run a function read and rewrite data on the same records, it returns 6418 nil Object exceptions
コメント
There are no comments made yet.
Ivan Smahin 承諾済みの回答
Can you send me your app? Or it is too hard to build it and debug on my side?
コメント
There are no comments made yet.
Ivan Smahin 承諾済みの回答
So you can not reproduce it with another app on the same db?
And I'm afraid I don't get it right - you also can not open that db with vStudio? Just File/Open Database, than check "all files" in the dialog...
It was not any issue on my side.
コメント
There are no comments made yet.
Stan Busk 承諾済みの回答
I found out right that the VTable.RecordExists( RecID ) is returning false on many records in that database. I then do a SQL query for those RecID and they are returned normally. I think my problem is definitely with the VTable.RecordExists( RecID ) function.Weird. It is fully verifiable on my app, I have tried to isolate this in a sample app unsuccessfully. The customer still can't use the file.
コメント
There are no comments made yet.
Ivan Smahin 承諾済みの回答
Just File/Open Database - nothing special.
Could you tell me what exactly you are trying to do - so, I would try to reproduce it here?
Latest vStudio, macOS.

About the same recID for different rows. Generally, it is possible.
- after Clone, LoadDump;
- after "DELETE FROM t1 WHERE RecID = x" - the "x" will be marked as deleted record (and may be reused by next INSERT statement).
コメント
There are no comments made yet.
Stan Busk 承諾済みの回答
Bad news then, I can't do almost anything with the file and the customer even less.

After a few hours, I was able to delete 3 entries with RecID #0. It is normal that 3 records could have the same #0 ID?

What did you do to open the FIle with vStudio? I can't here, it simply says it is not a valid database. maybe I am using the wrong menu?
コメント
There are no comments made yet.
Ivan Smahin 承諾済みの回答
Strange but I was able to open db with vStudio without any issue. Neither slowness nor errors. Diagnose says everything is ok.
コメント
There are no comments made yet.
Ivan Smahin 承諾済みの回答
You can send it to me - ivan_smahin at valentina-db.com
コメント
There are no comments made yet.
  • ページ :
  • 1


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

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories