Using Unidac on Delphi 2010 with Sybase

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
[email protected]
Posts: 1
Joined: Wed 16 Mar 2011 16:22

Using Unidac on Delphi 2010 with Sybase

Post by [email protected] » Fri 05 Aug 2011 15:25

Hi Team

We are testing Unidac with Sybase 15. We need to pass the application name or program name to the database while establishing the connection.

In order to identify the Unidac Connection in Backedn how can we set the program name?

Please let me know if any further information is required.

Thanks
AS

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Mon 08 Aug 2011 13:07

Hello,

At the moment UniDAC does not support the ApplicationName property for ASEUniProvider, we will add this property in the next UniDAC version.
Now you can define this property in the following way:

Code: Select all

procedure TForm1.UniConnection1AfterConnect(Sender: TObject);
begin
  UniConnection1.ExecSQL('set clientapplname ''my_test_app''',[]);
end;

sasdua
Posts: 73
Joined: Wed 16 Mar 2011 15:06

Post by sasdua » Mon 08 Aug 2011 14:22

AlexP wrote:Hello,

At the moment UniDAC does not support the ApplicationName property for ASEUniProvider, we will add this property in the next UniDAC version.
Now you can define this property in the following way:

Code: Select all

procedure TForm1.UniConnection1AfterConnect(Sender: TObject);
begin
  UniConnection1.ExecSQL('set clientapplname ''my_test_app''',[]);
end;
Alex..we tried this not working..Still Connection is getting failed.

we are taking program_name from master..sysprocess there still it is comming has null..

Basically to stop users to login to back end we are regulating in chk login trigger there we are getting program name from sysprocess.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 09 Aug 2011 11:41

Hello,

We've added the Applicationname property for ASEUniProvider, and the value of Applicationname that was set, will be displayed in the program_name field when executing the following query:

select * from sysprocesses

This property will be available in the next version of UniDAC that we plan to release in one or two weeks.

sasdua
Posts: 73
Joined: Wed 16 Mar 2011 15:06

Post by sasdua » Tue 09 Aug 2011 13:03

thanks alex,is it possible to provide us beta version for our testing?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 09 Aug 2011 13:34

Hello,

I can send a trial beta version with this feature, please specify your IDE and e-mail address.

sasdua
Posts: 73
Joined: Wed 16 Mar 2011 15:06

Post by sasdua » Tue 09 Aug 2011 14:58

we will send mail with the deatails.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Thu 11 Aug 2011 11:19

Hello,

I have answered you by e-mail.

sasdua
Posts: 73
Joined: Wed 16 Mar 2011 15:06

Post by sasdua » Mon 15 Aug 2011 08:47

Hi Alex,

We have installed the updated beta build but can you please let us know how can we set the application name using the driver as we are not able to find it under any property.

Regards
AS

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Mon 15 Aug 2011 11:28

Hello,

The ApplicationName option is available in the UniConnection dialog on the Options tab (in design-time), just like all other SpecificOptions. In run-time you can set this option in the following way (before connecting to database):

Code: Select all

UniConnection1.SpecificOptions.Values['ApplicationName']:= 'My_Application';

sasdua
Posts: 73
Joined: Wed 16 Mar 2011 15:06

Post by sasdua » Mon 15 Aug 2011 15:29

Hi Alex,

After setting the Application Name , its still not working.

You can check after setting the application name and then running the exe file created of the project from command prompt and checking whats the name coming in sysprocess. We are still getting it as null.

Also, we have encountered a space issue. In BDE if backend used to send a space, it used to trim that and then assign it to the Edit Box value But Unidac is not trimming the space while assigning.

Please help to check the issue and let us know if any solution is there. As if we need to trim each and every value it requires a lot of effort as we have many forms in our existing application.

Regards
AS

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Wed 17 Aug 2011 15:03

Hello,

We have fixed the issue with ApplicationName; a new beta version will be avaialble tomorrow on our FTP-server.
Please, provide more details regarding the issues with spaces.

Post Reply