1. Stan Busk
  2. Valentina Database ADK
  3. Samstag, August 29 2020, 07:34 AM
  4.  Abonnieren via E-Mail
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?
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
You can send it to me - ivan_smahin at valentina-db.com
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
Strange but I was able to open db with vStudio without any issue. Neither slowness nor errors. Diagnose says everything is ok.
Kommentar
There are no comments made yet.
Stan Busk Akzeptierte Antwort
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?
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
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).
Kommentar
There are no comments made yet.
Stan Busk Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
Can you send me your app? Or it is too hard to build it and debug on my side?
Kommentar
There are no comments made yet.
Stan Busk Akzeptierte Antwort
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
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
moValentinaTools Missing File '..\..\..\..\_libraries\Modules\moValentinaTools.rbo' /Users/Maxprog/Developments/_libraries/Modules/moValentinaTools.rbo
Kommentar
There are no comments made yet.
Stan Busk Akzeptierte Antwort
Sorry, the file has been updated and re-uploaded here is the new link: https://jmp.sh/BRlXjec
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
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
...
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort

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


And RecordExists( 176446 ) returns true as expected.
Kommentar
There are no comments made yet.
Stan Busk Akzeptierte Antwort
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?
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
Select recid, .... From ...
Select ** from ...
Kommentar
There are no comments made yet.
Stan Busk Akzeptierte Antwort
Ok, thanks, I have reassigned the field with the correct value and all is fine now!
Kommentar
There are no comments made yet.
  • Seite :
  • 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