BDE Migration to UniDAC with Sybase

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
sasdua
Posts: 73
Joined: Wed 16 Mar 2011 15:06

BDE Migration to UniDAC with Sybase

Post by sasdua » Fri 18 Mar 2011 15:05

Hi Everyone

We are planing to migrate from BDE to UniDAC on Delphi 10 with Sybase 15.
Could you please let us know is there any limitations with UniDAC and Sybase combination?

Thanks in advance!!

SP

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

Post by AlexP » Mon 21 Mar 2011 08:02

Hello,

UniDAC works with Sybase through ODBC driver, so UniDAC supports the same functionality implemented by specific ODBC driver.

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

Post by sasdua » Mon 21 Mar 2011 09:36

AlexP wrote:Hello,

UniDAC works with Sybase through ODBC driver, so UniDAC supports the same functionality implemented by specific ODBC driver.
Thanks alex..do we have any documents for setting up connections and usage of components?

we tried connection with harcoded values..as am new to ODBC settings am stuggling to find the way..

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

Post by AlexP » Mon 21 Mar 2011 14:17

Hello,

You can connect to the server like:

var
UniConnection: TUniConnection;
begin
UniConnection:= TUniConnection.Create(nil);
UniConnection.ProviderName := 'ASE';
UniConnection.Server := '.....';//server name
UniConnection.Port := 5000; //port
UniConnection.Username := '..'; //login
UniConnection.Password := '...';//password
try
UniConnection.Connect;
ShowMessage(UniConnection.ServerVersion);
finally
UniConnection.Free;
end;

You can find more information about setting up connections and using components in the UniDAC help.

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

Post by sasdua » Tue 22 Mar 2011 09:58

Hi

Thanks its working, but when I set the provider name as ASE, still its trying to connect to the database using ODBC Driver.

Also, it expects the hostname rather than the alias server as mentioned in sql.ini file in the Parameter value for the Server.

The value passed is @@servername to the server.

I am getting the below error message
Exception Raised [Sybase][ODBC Driver] Client unable to establish the connection

Thanks in advance

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

Post by AlexP » Tue 22 Mar 2011 11:09

Hello,

In both cases (using the ASE and ODBC providers) UniDAC connects to Sybase via the ODBC driver. The difference between the ASE and ODBC providers is that with ODBC you should create DSN and use it as a server name, and with ASE you can connect using only hostname.
Unfortunately, now UniDAC does not support working with Sybase ASE using sql.ini.
We will investigate the possibility of adding this feature in one of the next versions.

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

Post by sasdua » Tue 22 Mar 2011 15:41

Hi

Thanks for the information.

But any idea when this issue will be fixed as after migration we are planning to rollout in Production on all user machines where we have sql.ini file in place.

Also, The UniStoredProc component is retreiving the param names from database at design time without @

Eg : It will define the name as attr1 instead of @attr1 . In BDE, it was fetching the params like @attr1

Any idea why there is a difference or we have any option for param name check in TuniStoredProc

Regards
SP

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

Post by AlexP » Wed 23 Mar 2011 09:48

Hello,

We will try to add support of sql.ini as soon as posible.
We will investigate the possibility of adding '@' to to names of procedure parameters, but that is hardly to happen in the nearest future.
Now you need to change parameters names manually

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

Post by sasdua » Wed 23 Mar 2011 11:08

AlexP wrote:Hello,

We will try to add support of sql.ini as soon as posible.
We will investigate the possibility of adding '@' to to names of procedure parameters, but that is hardly to happen in the nearest future.
Now you need to change parameters names manually
Thanks a lot ..Appreciate your support,it would be greatful to us if the build comes in next 2weeks

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

Post by sasdua » Wed 23 Mar 2011 17:49

Hi

When defining the storedproc the parameters are getting populating from backend stored procedure but param type(in/out) is not getting..could you please let me know is there any settings to get those types...sorry to bug you more..i wasted my most of the time with dbexpress/sybase..which ended me with somany issues :roll: now am using unidac as of now i didnt see any major show stoppers..only thing i hv got above 2issues now this is the 3rd one which may take much of time..becuase manually i can easily change code but for this i need to click on the object and and i need to change each and every param type..please help me..i remember when i tested unidac 1st time i got the param type also now am not getting.

Thanks in advance!!

SP

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

Post by sasdua » Thu 24 Mar 2011 14:32

EODBCError with message"[MERANT][ODBC Sybase ASE driver]String data,right truncated.Error in parameter 23.


Scenario 1
----------
select dlast from tlastdate--> Jan 1 2099 12:00AM

I am getting as datetime and passing to storedproc as datetime still am getting this error..

ParamByName('insert23').AsDateTime := FixedDate;

Scenario 2
----------

ParamByName('insert23').AsDateTime := '1/1/2099'

Same error as above

Scenario 3
----------
ParamByName('insert23').AsDateTime := StrtoDateTime('1/1/2099')
Same error as above

Scenario 4
------------

ParamByName('insert23').AsDateTime := StrtoDateTime('Jan 1 2099 12:00AM')

Invalid date format

Please help me..

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

Post by sasdua » Thu 24 Mar 2011 16:38

sasdua wrote:EODBCError with message"[MERANT][ODBC Sybase ASE driver]String data,right truncated.Error in parameter 23.


Scenario 1
----------
select dlast from tlastdate--> Jan 1 2099 12:00AM

I am getting as datetime and passing to storedproc as datetime still am getting this error..

ParamByName('insert23').AsDateTime := FixedDate;

Scenario 2
----------

ParamByName('insert23').AsDateTime := '1/1/2099'

Same error as above

Scenario 3
----------
ParamByName('insert23').AsDateTime := StrtoDateTime('1/1/2099')
Same error as above

Scenario 4
------------

ParamByName('insert23').AsDateTime := StrtoDateTime('Jan 1 2099 12:00AM')

Invalid date format

Please help me..
ignore this..i did formatdatetime('mm/dd/yyyy',FixedDate) ...

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

Post by AlexP » Fri 25 Mar 2011 11:06

Hello,

The ParamType properties are correctly detected by default, you shouldn't set any options to get the ParamType properties.
Please try to reinstall UniDAC, maybe it'll help you to resolve this problem.

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

Post by sasdua » Fri 25 Mar 2011 14:21

AlexP wrote:Hello,

The ParamType properties are correctly detected by default, you shouldn't set any options to get the ParamType properties.
Please try to reinstall UniDAC, maybe it'll help you to resolve this problem.
thanks alex..let me try...

One more important Question..Do we need to have UniDAC Installed in Client machines to execute Delphi Exe or do we need distrubute to any DLL with the build...

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

Post by AlexP » Fri 25 Mar 2011 16:00

Hello,

You do not need to deploy any files with UniDAC-based applications built without run-time packages, provided that you are using a registered version of UniDAC.
For more information, please see the Deployment topic in the UniDAC help.

Post Reply