Soji
Members-
Content Count
43 -
Joined
-
Last visited
Community Reputation
1 Neutral-
Thanks @Anders Melander I did exactly same. I saw that even though it executes in the batch, server side it was inserting slowly. So I used transactions, it inserted super fast.
- 4 replies
-
- array dml
- performance
-
(and 1 more)
Tagged with:
-
Hi Brain, Thanks for your suggestion. But those OLEDB drivers are either not maintained or deprecated. Also FireDAC forces you to use ODBC driver. FireDAC, New OLE DB Driver, and SQL Server I figured out that if I use begin transaction and commit transaction, then the performance increases dramatically. 15 minutes to 1 minute!!! So I am satisfied with this solution and testing now. Kind regards, Soji.
- 4 replies
-
- array dml
- performance
-
(and 1 more)
Tagged with:
-
Hi, I am trying to rewrite a piece of legacy code which inserts a number of records in a bulk to SQL server tables(Total number of lines is around 200000 across 15 tables). Currently it uses ADO query to insert multiple records one by one. If the number of records are too high then this process takes a lot of time. I was trying to make it faster and came across FireDAC array DML and according to the documentation, inserting 100000 records can be done less than a second! So I implemented it and in my development machine (where application and database resides) it improved a lot. From 8 minutes to less than a minute. But when I tested it on a test environment where application and database resides on different machines connected by a network, performance is worse. (It was taking 10 minutes with ADO and with array DML it takes 15 minutes) I can't figure it out why array DML insert is taking more time than normal record by record insert. Any ideas? Delphi version: Delphi 10.4 SQL Server: 2017 SQL Driver: ODBC DRIVER 17 FOR SQL SERVER Kind regards, Soji.
- 4 replies
-
- array dml
- performance
-
(and 1 more)
Tagged with:
-
@Remy Lebeau: Thanks that worked like a charm... You were really helpful. Thanks for taking time to help me with this.
-
Thanks @Remy Lebeau for your time. I received a network log from the production server. They said that it is actually connecting to outlook through proxy! See the image below: But I get the "Connection closed Gracefully" exception when I call IdIMAP.Connect(false).
-
@Remy Lebeau: Thanks for your suggestion. I checked it but we use HTTP. So I used TIdConnectThroughHttpProxy and I investigated a bit more and adjusted code like this: p := TIdConnectThroughHttpProxy.Create(IdIMAP); io := TIdIOHandlerStack.Create(IdIMAP); p.Host :='x.x.x.x'; // Proxy server ip p.port :=1234; // Proxy server port p.Enabled := true; io.TransparentProxy:=p; IdIMAP.IOHandler := io; IdIMAP.Host := 'outlook.office365.com'; IdIMap.Port := 993; IdIMAP.Password := 'Pass123'; Now I get the "Connection closed Gracefully" exception when I call IdIMAP.Connect(false). Thanks for your time, Soji.
-
No. The proxy doesn't require it's own authentication.
-
Hi, I am trying to figure out how to connect to office 365 through a proxy server. My application is working well if I connect without a proxy. But now the requirement changed and direct connection to internet is not allowed and I have to use a proxy. I can connect to office 365 from the production machine through proxy using a browser. So the connection setup is good. Now I need to change my application to use a proxy. So I looked around and found that I have to use TIdIOHandlerStack and IdConnectThroughHttpProxy1 to achieve it. But the help document is not that great. So looking for suggestions/help. My code looks like this. type TForm1 = class(TForm) Button1: TButton; IdIMAP: TIdIMAP4; IdConnectThroughHttpProxy1: TIdConnectThroughHttpProxy; IdIOHandlerStack1: TIdIOHandlerStack; Memo1: TMemo; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin IdIMAP.Username := 'test@test.com'; // outlook user name IdIMAP.Password := 'xxxxx'; // outlook user password IdIMAP.Port := 993; // outlook server port IdIMAP.Host := 'outlook.office365.com'; // outlook server IdIMAP.AuthType := iatUserPass; IdConnectThroughHttpProxy1.Host := 'x.x.x.x'; // Proxy server IdConnectThroughHttpProxy1.Port := 1234; // Proxy server port IdIOHandlerStack1.TransparentProxy := IdConnectThroughHttpProxy1; IdIMAP.IOHandler := IdIOHandlerStack1; try Memo1.Lines.Clear; Memo1.Lines.Add('Trying to connect to server...'); if not IdIMAP.Connected then begin if IdIMAP.Connect(false) then Memo1.Lines.Add('Connected to server') else Memo1.Lines.Add('NOT Connected to server') end; Memo1.Lines.Add('Trying to login to server...'); if not(IdIMAP.ConnectionState in [csAuthenticated, csSelected]) then IdIMAP.Login; Memo1.Lines.Add('Logged in to server'); except on E: Exception do begin Memo1.Lines.Add('Error while connecting: ' + E.Message); end; end; end; When I try this, I get "Error while connecting: 403 forbidden error" Thanks for your time, Kind regards, Soji.
-
How to set version number for all the projects in a project group
Soji replied to Soji's topic in Delphi IDE and APIs
Thanks @emailx45. I started exactly with same idea sometime back. Then I found some issue when we upgraded Delphi version. The *.dproj file changed and my search and replace failed or did not work with different build configurations. I created a tool to search and replace build version at that time. Thanks for your detailed answer. Much appreciated.- 11 replies
-
- build version
- configuration manager
-
(and 3 more)
Tagged with:
-
How to set version number for all the projects in a project group
Soji replied to Soji's topic in Delphi IDE and APIs
Thanks @Anders Melander. I was also not looking for any utilities. Try to find a best solution within IDE/projects itself.- 11 replies
-
- build version
- configuration manager
-
(and 3 more)
Tagged with:
-
How to set version number for all the projects in a project group
Soji posted a topic in Delphi IDE and APIs
Hi, I am looking for an easy option to set "version information" of multiple projects with in a project group at the same time. Is there any option already available wit the Delphi IDE? Going through each and every project and updating the version information for a particular build configuration is error prone and cumbersome. I have almost 75 projects in a project group. Don't want to click through each and every project and enter the version information for every release. Any best practices or suggestions to handle this situation? I use configuration manager to select a configuration to build all the projects in my development machine. (For release build I use a build server and MSBUILD) Kind regards, Soji.- 11 replies
-
- build version
- configuration manager
-
(and 3 more)
Tagged with:
-
Thanks for all the inputs. CryptoLib4Pascal worked for me.
- 35 replies
-
- encryption
- decryption
-
(and 2 more)
Tagged with:
-
@Kas Ob.: I spotted the same. Thanks for pointing it out. Yes. You have to use another package HashLib4Pascal from same authors. I use that package for PKDF2.
- 35 replies
-
- encryption
- decryption
-
(and 2 more)
Tagged with:
-
Hi, I am looking for a Delphi AES encryption/decryption library to decrypt a text which is encrypted using power-shell script. Another application encrypts a text using power-shell and put it into a file. My Delphi application has to read the file and decrypt the string. This is the power-shell script to encrypt ( Powershell encrypt and decrypt ). I want to mimic the function fAESDecrypt() in Delphi. Anyone knows any libraries which can do this? If there is nothing out there which can do it, I am thinking about executing the power-shell from Delphi to decrypt it. I think that should be possible. Thanks in advance, Soji.
- 35 replies
-
- encryption
- decryption
-
(and 2 more)
Tagged with:
-
Yes. That is right. I already "fixed" it. But it is really strange to say that I have to add "getit" right?
- 5 replies
-
- delphi 10.4.1
- getit
-
(and 3 more)
Tagged with: