Jump to content

Skrim

Members
  • Content Count

    20
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I was looking for a service to check an xml/xsd and came across this great site. Lots of interesting things in one place. https://www.freeformatter.com I'm sure most of you knew this one, but i did not. Any other helpful sites I have missed? 🙂
  2. Skrim

    Parse Json

    A big thank you to you Boris, also to Remy. I also read this thread with great interest, New to JSON. In addition to the code above I had to paste GetObject and GetValue from New to Json. I could not have done this on my own.
  3. Skrim

    Parse Json

    Thanks for your answer. You mean, jsonarray:=(jsonObj.Values['forretningsadresse'] as TJSONObject).Values['adresse']; It will not compile. I'm sorry, my knowledge/understanding of this topic is very poor.
  4. Skrim

    Parse Json

    Modified Json { "forretningsadresse":{ "land":"Norge", "landkode":"NO", "postnummer":"3616", "poststed":"KONGSBERG", "adresse":[ "Storgata 8" ] } } I have tried this code, but jsonArray is always nil. I quess I'm not refering correctly to the Json? var jsonObj: TJsonObject; jsonArray: TJsonArray; begin jsonObj:=TJsonObject.ParseJSONValue(memo1.Lines.Text) as TJsonObject; // Json in memo1 jsonArray:=jsonObj.GetValue('forretningsadresse'+ '.' + 'adresse') as TJsonArray; if jsonArray<>nil then begin ... end; ... end;
  5. Skrim

    Parse Json

    Hi I am struggling parsing this Jsonfile. I can parse all of it's values, except from the array. This is where I fail: "adresse": ["Some text"], As I understand it this is an array. Code for parsing text elements: companyinfo:=tjsonobject.parsejsonvalue(restresponse1.Content) as tjsonobject; s:=companyinfo.GetValue('navn').Value; ss:=companyinfo.GetValue<string>('forretningsadresse'+ '.' + 'postnummer'); s now has the value of the string, aCompanyname LTD ss now has the value of the string, 3616 Help with parsing the array would be greatly appreciated. Here is the Json: { "organisasjonsnummer": "123456789", "navn": "aCompanyname LTD", "organisasjonsform": { "kode": "LTD", "beskrivelse": "Aksjeselskap", "_links": { "self": { "href": "https://..alink..." } } }, "registreringsdatoEnhetsregisteret": "1995-02-20", "registrertIMvaregisteret": true, "naeringskode1": { "beskrivelse": "Some text", "kode": "69.201" }, "antallAnsatte": 2, "forretningsadresse": { "land": "Norge", "landkode": "NO", "postnummer": "3616", "poststed": "KONGSBERG", "adresse": [ "Some text" ], "kommune": "KONGSBERG", "kommunenummer": "3006" }, "stiftelsesdato": "1994-06-06", "institusjonellSektorkode": { "kode": "2100", "beskrivelse": "Private aksjeselskaper mv." }, "registrertIForetaksregisteret": true, "registrertIStiftelsesregisteret": false, "registrertIFrivillighetsregisteret": false, "sisteInnsendteAarsregnskap": "2020", "konkurs": false, "underAvvikling": false, "underTvangsavviklingEllerTvangsopplosning": false, "maalform": "Bokmål", "_links": { "self": { "href": "https://...a link..." } } }
  6. As far as I can see the last update was 29th May 2020? Anyone got news about this?
  7. Skrim

    Transactions

    I have done some testing, it seems I do need a Commit. Without it the data is not saved to the database. So at least using Postgresql and you start a transaction, you either have to commit or rollback. Ole
  8. Skrim

    Transactions

    It's a PostgreSql database.
  9. Skrim

    Transactions

    Done. Now, what is your answer to my question
  10. Skrim

    Transactions

    Hi I have this code: (Database is PostgreSql) try aDatabase.starttransaction; ... except on edatabaseerror do begin aDatabase.rollback; end; end; But what about a commit. Is it done automatically here, hence not necessary? Regards, Ole
  11. Skrim

    RAD Studio 11 Alexandria is now available

    Does this inc the installation counter for 10.4? I'm close to/on the limit. Ole
  12. Skrim

    Cannot install Delphi 11

    I have an active subscription but I am not able to install the new version. During installation I get a message about my license is not valid for Delphi 11. Here is a screen shot from the Customer Portal and my account. I understand there is a "hickup" in the license manager? The instructions by Marco Cantu to fix this does not work for me. Can you please fix this as soon as possible or at least give some information about the issue. Regards, Ole
  13. Skrim

    RAD Studio 11 Alexandria is now available

    Does not work for me, The new version 11 is NOT listed, even after clicking Update. I have contacted Support several hours ago, no answer yet. This is not a nice experience. Ole
  14. Skrim

    Help with Sql

    Thanks Stano Works great 🙂 SELECT customer, SUM(amount) FROM aTable Group by customer having sum(amount)= 0 Regards, Ole
  15. Skrim

    Help with Sql

    Database is PostgreSql. In a table I have: Customer Amount 10000 100 10020 110 10150 350 10000 -100 10300 200 I want to retrieve only customers where Amount is 0 (100-100=0), in this case Customer 10000. How can I do this using Sql? Thanks in advance. Ole
×