1. Stan Busk
  2. Valentina Database ADK
  3. Saturday, August 29 2020, 07:34 AM
  4.  Subscribe via email
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?
Comment
There are no comments made yet.
Stan Busk Accepted Answer
Ok, thanks, I have reassigned the field with the correct value and all is fine now!
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
Select recid, .... From ...
Select ** from ...
Comment
There are no comments made yet.
Stan Busk Accepted Answer
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?
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer

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


And RecordExists( 176446 ) returns true as expected.
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
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
...
Comment
There are no comments made yet.
Stan Busk Accepted Answer
Sorry, the file has been updated and re-uploaded here is the new link: https://jmp.sh/BRlXjec
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
moValentinaTools Missing File '..\..\..\..\_libraries\Modules\moValentinaTools.rbo' /Users/Maxprog/Developments/_libraries/Modules/moValentinaTools.rbo
Comment
There are no comments made yet.
Stan Busk Accepted Answer
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
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
Can you send me your app? Or it is too hard to build it and debug on my side?
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
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.
Comment
There are no comments made yet.
Stan Busk Accepted Answer
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.
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
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).
Comment
There are no comments made yet.
Stan Busk Accepted Answer
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?
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
Strange but I was able to open db with vStudio without any issue. Neither slowness nor errors. Diagnose says everything is ok.
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
You can send it to me - ivan_smahin at valentina-db.com
Comment
There are no comments made yet.
  • Page :
  • 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