Hello!
It´s possivel to create a connection pool with dbExpress Driver using Delphi XE2 Professional?
Search found 14 matches
- Mon 19 Sep 2022 12:17
- Forum: dbExpress driver for SQL Server
- Topic: Connection Pool
- Replies: 1
- Views: 8157
- Wed 25 May 2022 19:43
- Forum: dbExpress driver for SQL Server
- Topic: SPId of Current Connection
- Replies: 1
- Views: 8134
SPId of Current Connection
Is it possible to retrieve the @@spid of the current connection of TSQLConnection?
My issue is this,
when I connect the database on my app for the first time I execute, on the event AfterConnect, SELECT @@spid to store the spid,
but if my network broke e gets online again after a few moments, the connection is reestablished, but with new @@spid, and the event AfterConnect is not triggered.
My issue is this,
when I connect the database on my app for the first time I execute, on the event AfterConnect, SELECT @@spid to store the spid,
but if my network broke e gets online again after a few moments, the connection is reestablished, but with new @@spid, and the event AfterConnect is not triggered.
- Thu 16 Dec 2021 14:29
- Forum: dbExpress driver for SQL Server
- Topic: Get new Identity Inserted in ClientDataSet (Delphi + SQL Server with Devart)
- Replies: 3
- Views: 20513
Get new Identity Inserted in ClientDataSet (Delphi + SQL Server with Devart)
Hello.
I'm inserting a new record in a table with an identity column.
It's possible to retrieve the value generated on this new record after the post is finished?
Thanks,
Ronaldo.
I'm inserting a new record in a table with an identity column.
It's possible to retrieve the value generated on this new record after the post is finished?
Thanks,
Ronaldo.
- Tue 23 Mar 2021 12:12
- Forum: dbExpress driver for SQL Server
- Topic: SECDoClientHandshake Error
- Replies: 1
- Views: 10401
SECDoClientHandshake Error
Hello!
I recently change my SQL-Server to a Linux 2019 version.
Now I'm getting this error when I try to connect from a delphi app, on a machine with Windows Server 2008 R2 Enterprise:
"SQL State: 1, SQL Error Code: 18, Level: 16, Procedure: , Line: 0
[DBNETLIB][ConnectionOpen (SECDoClientHandshake()).]Erro de segurança SSL"
- When I connect to the old server, same 2019 version, the error doesn't occur;
- When I connect to this new server, in other machine, with Windows 10, the error doesn't occur;
Please, what do I need to change for this connection to work?
dbexpsda40.dll version: 7.5.7.0, 12/12/2018
TSQLConnection :
Driver: DevartSQLServer
LibraryName: dbexpsda40.dll
VendorLib: sqloledb.dll
I recently change my SQL-Server to a Linux 2019 version.
Now I'm getting this error when I try to connect from a delphi app, on a machine with Windows Server 2008 R2 Enterprise:
"SQL State: 1, SQL Error Code: 18, Level: 16, Procedure: , Line: 0
[DBNETLIB][ConnectionOpen (SECDoClientHandshake()).]Erro de segurança SSL"
- When I connect to the old server, same 2019 version, the error doesn't occur;
- When I connect to this new server, in other machine, with Windows 10, the error doesn't occur;
Please, what do I need to change for this connection to work?
dbexpsda40.dll version: 7.5.7.0, 12/12/2018
TSQLConnection :
Driver: DevartSQLServer
LibraryName: dbexpsda40.dll
VendorLib: sqloledb.dll
- Tue 29 May 2018 12:21
- Forum: dbExpress driver for SQL Server
- Topic: Client-Server connection error after Windows Update
- Replies: 1
- Views: 5370
Client-Server connection error after Windows Update
Hello,
After my Windows 10 updated to version 1803, build 17134 I'm not been able to connect delphi applications stored in network path.
If the application is stored on local path the connection works fine.
Someone else is having the same problem?
After my Windows 10 updated to version 1803, build 17134 I'm not been able to connect delphi applications stored in network path.
If the application is stored on local path the connection works fine.
Someone else is having the same problem?
- Thu 18 Aug 2016 19:04
- Forum: dbExpress driver for SQL Server
- Topic: exec sp_executesql
- Replies: 7
- Views: 9865
Re: exec sp_executesql
Thanks for your reply ViktorV.
I see that this is related to "parameter sniffing" on SQL-Server.
But why most of queries run fast and others don't?
Is there a way that the dbExpress driver do not send queries to SQL-Server with sp_executesql procedure?
I see that this is related to "parameter sniffing" on SQL-Server.
But why most of queries run fast and others don't?
Is there a way that the dbExpress driver do not send queries to SQL-Server with sp_executesql procedure?
- Wed 17 Aug 2016 14:16
- Forum: dbExpress driver for SQL Server
- Topic: exec sp_executesql
- Replies: 7
- Views: 9865
Re: exec sp_executesql
Thanks for your help ViktorV.
I just send you an e-mail.
I just send you an e-mail.
- Wed 17 Aug 2016 12:08
- Forum: dbExpress driver for SQL Server
- Topic: exec sp_executesql
- Replies: 7
- Views: 9865
Re: exec sp_executesql
Hello,
I'm really sorry for the delay to answer you back, but now I have another SqlQuery that runs extremely slow with parameters and really fast without it.
It's possible to send you an attachment with the code that I'm running?
A piece of the code is this:
I'm really sorry for the delay to answer you back, but now I have another SqlQuery that runs extremely slow with parameters and really fast without it.
It's possible to send you an attachment with the code that I'm running?
A piece of the code is this:
Code: Select all
sqlSemMovto.Close;
sqlSemMovto.SQL.Clear;
sqlSemMovto.SQL.Add(' SELECT TB11A.CODCONTA, TB11A.VALSALDO ');
sqlSemMovto.SQL.Add(' FROM TBCONT011 TB11A ');
sqlSemMovto.SQL.Add(' WHERE TB11A.CODEMP = :ParCodEmp ');
sqlSemMovto.SQL.Add(' AND TB11A.ANOLOTE = :ParAnoLote1 ');
sqlSemMovto.SQL.Add(' AND TB11A.MESLOTE = :ParMesLote1 ');
sqlSemMovto.SQL.Add(' AND NOT EXISTS ');
sqlSemMovto.SQL.Add(' ( SELECT DISTINCT TB11B.CODCONTA ');
sqlSemMovto.SQL.Add(' FROM TBCONT011 TB11B ');
sqlSemMovto.SQL.Add(' WHERE TB11B.CODEMP = TB11A.CODEMP ');
sqlSemMovto.SQL.Add(' AND TB11B.ANOLOTE = :ParAnoLote2 ');
sqlSemMovto.SQL.Add(' AND TB11B.MESLOTE = :ParMesLote2 ');
sqlSemMovto.SQL.Add(' AND TB11B.CODCONTA = TB11A.CODCONTA ) ');
sqlSemMovto.ParamByName('ParCodEmp').AsString := FormPrincipal.FCodEmp;
sqlSemMovto.ParamByName('ParAnoLote1').AsString := Copy(MaskEditUltimoANOMES.Text, 3, 4);
sqlSemMovto.ParamByName('ParMesLote1').AsString := Copy(MaskEditUltimoANOMES.Text, 1, 2);
sqlSemMovto.ParamByName('ParAnoLote2').AsString := Copy(MaskEditProximoANOMES.Text, 3, 4);
sqlSemMovto.ParamByName('ParMesLote2').AsString := Copy(MaskEditProximoANOMES.Text, 1, 2);
sqlSemMovto.Open;
sqlSemMovto.First;
- Thu 28 Apr 2016 13:58
- Forum: dbExpress driver for SQL Server
- Topic: exec sp_executesql
- Replies: 7
- Views: 9865
exec sp_executesql
Helo,
I'm using this driver, version 160, with DelphiXE2.
Today I noticed, trough SQL Profiler, that the commands executed with sp_executesql are slower than a "clean" command.
Is there a way to fix this? Is there a parameter in TSQLQuery that not use sp_executesql?
Here it's the command with sp_executesql,
the statistics showed in Profiler was Reads: 3498, Writes: 9, Duration 140:
[/size]
Here it's the "clean command, without parameters,
the statistics showed in Profiler was Reads: 10, Writes: 9, Duration 0:
[/size]
I'm using this driver, version 160, with DelphiXE2.
Today I noticed, trough SQL Profiler, that the commands executed with sp_executesql are slower than a "clean" command.
Is there a way to fix this? Is there a parameter in TSQLQuery that not use sp_executesql?
Here it's the command with sp_executesql,
the statistics showed in Profiler was Reads: 3498, Writes: 9, Duration 140:
Code: Select all
exec sp_executesql N'UPDATE TBESTO004 SET VALUNITMOVTO = @P1 ,
QTDMOVTO = @P2 ,
VALMOVTO = @P3 ,
HISTORICO = @P4
WHERE CODEMP = @P5
AND NUMLANC = @P6',N'@P1 money,@P2 bigint,@P3 money,@P4 nvarchar(1),@P5 nvarchar(2),@P6 nvarchar(9)',$16.3750,18,$294.7500,N'',N'01',N'002667024'
Here it's the "clean command, without parameters,
the statistics showed in Profiler was Reads: 10, Writes: 9, Duration 0:
Code: Select all
UPDATE TBESTO004 SET VALUNITMOVTO = 16.375,
QTDMOVTO = 18,
VALMOVTO = 294.75,
HISTORICO = ''
WHERE CODEMP = '01'
AND NUMLANC = '002667024'
- Mon 19 Aug 2013 14:14
- Forum: dbExpress driver for SQL Server
- Topic: ClientDataSet - AggregateField - Change Index
- Replies: 5
- Views: 5461
Re: ClientDataSet - AggregateField - Change Index
Thanks AndreyZ.
I was creating a sample to send to you, and I think I figured out what the problem is.
If the ClientDataSet is opened with an IndexFieldName already set and different from the index of aggregate field the problem occurs.
If the index is set after the clientdataset is opened then the Sum of aggregate field is correct.
If you are still unable to reproduce this problem, please let me know, I'll send you my
sample.
Thank you very much for your help.
I was creating a sample to send to you, and I think I figured out what the problem is.
If the ClientDataSet is opened with an IndexFieldName already set and different from the index of aggregate field the problem occurs.
If the index is set after the clientdataset is opened then the Sum of aggregate field is correct.
If you are still unable to reproduce this problem, please let me know, I'll send you my
sample.
Thank you very much for your help.
- Fri 16 Aug 2013 13:25
- Forum: dbExpress driver for SQL Server
- Topic: ClientDataSet - AggregateField - Change Index
- Replies: 5
- Views: 5461
Re: ClientDataSet - AggregateField - Change Index
Thanks for the reply Andrey.
I was wary of that the problem is not with the dbExpress driver.
I was just trying to see if I could find some tip here.
Thanks
Ronaldo.
I was wary of that the problem is not with the dbExpress driver.
I was just trying to see if I could find some tip here.
Thanks
Ronaldo.
- Thu 15 Aug 2013 12:57
- Forum: dbExpress driver for SQL Server
- Topic: ClientDataSet - AggregateField - Change Index
- Replies: 5
- Views: 5461
ClientDataSet - AggregateField - Change Index
I'm using a ClientDataSet and need to show the sum of all records of a table with an aggregate field.
When the ClientDataSet is opened the value of the aggregate field is correct. However, the user can change the IndexFieldName to sort the grid.
When this happens the value of the aggregate field appears doubled.
This is the configuration of the aggregate field:
What can I do to avoid this?
When the ClientDataSet is opened the value of the aggregate field is correct. However, the user can change the IndexFieldName to sort the grid.
When this happens the value of the aggregate field appears doubled.
This is the configuration of the aggregate field:
Code: Select all
wwClientDataSetExtratoSumCalcVALMOVTO.Active := True;
wwClientDataSetExtratoSumCalcVALMOVTO.IndexName := '';
wwClientDataSetExtratoSumCalcVALMOVTO.GroupingLevel := 0;
- Wed 14 Nov 2012 21:15
- Forum: dbExpress driver for SQL Server
- Topic: Migration from BDE - LangDriver
- Replies: 3
- Views: 4913
Re: Migration from BDE - LangDriver
Hello Andrey, thanks for the feedback.
Actually my problem is with the caracter accentuation.
All my database records has been posted with the BDE LANGDRIVER "Pdox ANSI Intl850".
When I view the record with a BDE application the accentuated text is correct.
If I view the record outside BDE, on SQL-Server Management Studio or a DBExpress application for example, the letters are letters are switched.
Example:
With BDE : OBSERVAÇÕES
||
With dbExpress: OBSERVAÃıES
Thanks,
Ronaldo.
Actually my problem is with the caracter accentuation.
All my database records has been posted with the BDE LANGDRIVER "Pdox ANSI Intl850".
When I view the record with a BDE application the accentuated text is correct.
If I view the record outside BDE, on SQL-Server Management Studio or a DBExpress application for example, the letters are letters are switched.
Example:
With BDE : OBSERVAÇÕES
||
With dbExpress: OBSERVAÃıES
Thanks,
Ronaldo.
- Wed 14 Nov 2012 13:18
- Forum: dbExpress driver for SQL Server
- Topic: Migration from BDE - LangDriver
- Replies: 3
- Views: 4913
Migration from BDE - LangDriver
Hello,
On connecting a SQL-Server database with the old BDE (Borland Database Engine) there is a LangDriver parameter.
We used to use the "Pdox ANSI Intl850" option.
Now with this dbExpress driver is there an equivalent option for this?
Thanks,
Ronaldo.
On connecting a SQL-Server database with the old BDE (Borland Database Engine) there is a LangDriver parameter.
We used to use the "Pdox ANSI Intl850" option.
Now with this dbExpress driver is there an equivalent option for this?
Thanks,
Ronaldo.