Jump to content

Skrim

Members
  • Content Count

    22
  • Joined

  • Last visited

Everything posted by Skrim

  1. Skrim

    Emails via Indy to Gmail

    Hi Lately I have had trouble getting emails through to addressee@gmail.com from my Delphi app Win32/D11. Today I sent 8 emails to Gmail and 1 was returned "Message missing a valid messageID header are not 550 5.7.1 accepted". (Every mail is generated the same way) It seems pretty random as 7 went through and 1 not. Some days all emails to Gmail are returned, other days none. All other addresses than Gmail have no trouble being received by the addressee . Is there something I can set in Indy to avoid this?
  2. Skrim

    Emails via Indy to Gmail

    Hi I will post a copy of the returned mail tomorrow, it's at work.
  3. 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? 🙂
  4. 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..." } } }
  5. 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.
  6. 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.
  7. 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;
  8. As far as I can see the last update was 29th May 2020? Anyone got news about this?
  9. 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
  10. 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
  11. Skrim

    Transactions

    It's a PostgreSql database.
  12. Skrim

    Transactions

    Done. Now, what is your answer to my question
  13. 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
  14. 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
  15. 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
  16. 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
  17. Skrim

    Help with Sql

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

    XmlLite.Dll

    D 10.4.2 and Win10. My program suddenly will not execute spesific parts of my program, but crashes. (No change in actual code) When that happens also the Delhi IDE crashes. There might be a file called XmlLite.Dll that causes this, but I'm not sure. The file is on my pc in several directories. Anybody else experienced this? Maybe reinstall Delphi? Regards, Ole
  19. If you have a Postgres database and need to document it, this is a nice tool. https://www.yohz.com/dbdoc_details.htm Just a happy Customer.
  20. Delphi 10.4 procedure TForm1.Button1Click(Sender: TObject); var i : byte; j : integer; begin screen.Cursor:=crHourGlass; try j:=30000; i:=j; showmessage(inttostr(i)); finally screen.Cursor:=crDefault; end; end; If I set i=3 then inttostr gives me 3 If I set i=3000 then inttostr gives me 184 If I set i=30000 then inttostr gives me 48 I thought 3000 and 30000 would raise an exception, as they are out of range?
  21. Am I allowed to tip about a software program here, not directly related to Delphi, or is that considered spam? It's a little utility I think make my programming task a little bit easier. It's not made by me, nor have I any connections to the company.
  22. Thanks, I thought they were set by default. Moral, don't take anything for granted 🙂
×