Skrim
-
Content Count
47 -
Joined
-
Last visited
Posts posted by Skrim
-
-
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?
-
I was looking for a service to check an xml/xsd and came across this great site.
Lots of interesting things in one place.
I'm sure most of you knew this one, but i did not. Any other helpful sites I have missed? 🙂
-
2 hours ago, boris.nihil said:var
JsonValueArr,JsonValue: TJSONValue;
JsonObject: TJSONObject;jasonArr: TJSONArray;
begin
JsonValue := TJSONObject.ParseJSONValue(memoRequest.Lines.Text);
if JsonValue = nil then
begin
ShowMessage('Error');
end else
begin
JsonObject := JsonValue as TJSONObject;
JsonObject := GetObject(JsonObject, 'forretningsadresse');
jasonArr := GetValue(JsonObject, 'adresse') as TJSONArray;
for JsonValueArr in jasonArr do
begin
showmessage(JsonValueArr.Value);
end;end;
end;
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.
-
1 hour ago, Attila Kovacs said:for example: (jsonObj.Values['forretningsadresse'] as TJSONObject).Values['adresse']
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.
-
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;
beginjsonObj:=TJsonObject.ParseJSONValue(memo1.Lines.Text) as TJsonObject; // Json in memo1
jsonArray:=jsonObj.GetValue('forretningsadresse'+ '.' + 'adresse') as TJsonArray;if jsonArray<>nil then
begin...
end;
...
end;
-
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..."
}
}
} -
As far as I can see the last update was 29th May 2020?
Anyone got news about this?
-
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
-
2 hours ago, David Heffernan said:Just to be clear, what is aDatabase. I suppose the answer could depend on that information.
It's a PostgreSql database.
-
21 minutes ago, haentschman said:Hi...
try aDatabase.Starttransaction; ... aDatabase.Commit except on edatabaseerror do begin aDatabase.Rollback; end; end;
Please use the "Code Tags" </>
Done.
Now, what is your answer to my question
-
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 hours ago, esegece said:The installation now works for me, I've received a response from Embarcadero support, I paste below:
This is a known issue that we have resolved earlier today. Please follow these steps to resolve the license error:
In the Product Registration window please select the Advanced button
- The Embarcadero License Manager will Launch
- In the License Manager please click the Delete button to delete your license
- Click the Register button and re-register your license
- Click Done and this will continue the installation.
For isolated or offline machines you will need to obtain a new activation file from https://license.embarcadero.com/srs6/activation.doDoes this inc the installation counter for 10.4? I'm close to/on the limit.
Ole
-
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
-
17 hours ago, Darian Miller said:"To anyone trying to install RAD Studio 11, there is a hiccup on license refresh: In the Product Registration window please select the Advanced button, and in the License manager select your license and use the Update button. Alexandria gets added, continue with installation."
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
- 2
-
Thanks Stano
Works great 🙂
SELECT customer, SUM(amount)
FROM aTable
Group by customer
having sum(amount)= 0Regards,
Ole
-
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
-
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
-
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.
-
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.
-
Thanks, I thought they were set by default.
Moral, don't take anything for granted 🙂 -
Delphi 10.4
procedure TForm1.Button1Click(Sender: TObject);
var
i : byte;
j : integer;
beginscreen.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?
Emails via Indy to Gmail
in Indy
Posted
Hi
I will post a copy of the returned mail tomorrow, it's at work.