Two Errors When Use ASE Provider to connect SYBASE

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cxg417
Posts: 41
Joined: Thu 26 Mar 2009 08:07

Two Errors When Use ASE Provider to connect SYBASE

Post by cxg417 » Sat 17 Oct 2009 14:29

I Download UniDAC 3.0.0.3 TralVersion and I Connect Sybase ASE through ASE Provider.

1.The following error occurred when Start transaction to save two tables
Catalog procedure 'sp_statistics' can not be run in a transaction

2.I Found that TUniStoreProc does not automatically generate the parameters named 'RETURN_VALUE'

thanks

My english is very poor
________
MARIJUANA HEMP
Last edited by cxg417 on Thu 10 Mar 2011 10:57, edited 1 time in total.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 19 Oct 2009 10:29

1. We could not reproduce the problem. Please describe the steps to reproduce the problem.

2. We have fixed this problem. The fix will be included in the next build of UniDAC.

cxg417
Posts: 41
Joined: Thu 26 Mar 2009 08:07

Post by cxg417 » Tue 20 Oct 2009 15:21

Catalog procedure 'sp_statistics' can not be run in a transaction

This error only occurs when running in the designtime?but use UniSQLMonitor able to monitor this Error in the runtime
________
Ford axod transmission history
Last edited by cxg417 on Tue 15 Feb 2011 14:58, edited 1 time in total.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 21 Oct 2009 08:20

Please provide us a Pascal code that reproduces the problem.

cxg417
Posts: 41
Joined: Thu 26 Mar 2009 08:07

Post by cxg417 » Thu 22 Oct 2009 16:01

Code:

try
UniConnection1.StartTransaction;
UniQuery1.ApplyUpdates;
UniQuery2.ApplyUpdates; ->Catalog procedure 'sp_statistics' can not be run in a transaction
UniConnection1.Commit;
except
UniConnection1.Rollback;
UniQuery1.RestoreUpdates;
UniQuery2.RestoreUpdates;
raise;
end;
UniQuery1.CommitUpdates;
UniQuery2.CommitUpdates;

________
GLASS BUBBLERS
Last edited by cxg417 on Tue 15 Feb 2011 14:59, edited 1 time in total.

cxg417
Posts: 41
Joined: Thu 26 Mar 2009 08:07

Post by cxg417 » Thu 22 Oct 2009 16:06

The recent new error

3.Call RefreshRecord, Key fields not found

4.
Select sName,sAddr,sPhone
From Table1
Union All
Select sXM,sDZ,''
From Table2 Where sXM=:P_XM

Auto-generated field name is incorrect ,Auto-generated field name are 'sName','sAddr','_1'

but if
Select sName,sAddr,sPhone
From Table1
Union All
Select sXM,sDZ,''
From Table2 --Where sXM=:P_XM
then Auto-generated field name is correct

5.
UniStoredProc1.ParamByName('P_Name').AsString='A';
UniStoredProc1.ParamByName('P_Adde').AsString='B';
UniStoredProc1.Open;

Parameter values are not bound when first execute.
but Add 'UniStoredProc1.Prepare' can bound Value when first execute.

6.
UniQuery1.SQl.Text:='Select * From Hans_BZ..Table1'
But UniQuery1.Connection is Hans_RS,then
UniQuery Is ReadOnly after open.

But UniQuery isn't readonly after open when connect to MS SQL 2000
________
New mexico medical marijuana
Last edited by cxg417 on Tue 15 Feb 2011 14:59, edited 5 times in total.

cxg417
Posts: 41
Joined: Thu 26 Mar 2009 08:07

Post by cxg417 » Thu 22 Oct 2009 16:44

Sybase Version: ASE 12.5

Sybase ODBC Driver Version :syodase.dll 4.20.0.67
syodbas.dll 4.20.0.28
________
MEDICAL MARIJUANA CARD
Last edited by cxg417 on Tue 15 Feb 2011 14:59, edited 1 time in total.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 27 Oct 2009 08:58

1. We have fixed the problem with sp_statistics. The fix will be included in the next UniDAC build.

3. Your query should contain key fields to perform RefreshRecord. UniDAC adds values of key fields to the WHERE clause of the generated SELECT statement.
UniDAC cannot generate the correct SQL statement to refresh record in a query with UNION. You should set a value to the SQLRefresh property manually.

4. Field names are generated by the ASE server. They do not depend on UniDAC.

5. Maybe the correct stored procedure call is not yet generated when you assing values to the parameters. You can generate the stored procedure call at design-time by setting the stored procedure name in the TUniStoredProc editor. You can generate the stored procedure call at run-time using the PrepareSQL method. Try to call it before assigning the parameters values.

6. We have fixed this problem. The fix will be included in the next build of UniDAC.

cxg417
Posts: 41
Joined: Thu 26 Mar 2009 08:07

Post by cxg417 » Tue 27 Oct 2009 15:17

Thank you for your reply

These problems are correct When connect SQL Server 2000
Data structure is the same as
________
Vtx1800c
Last edited by cxg417 on Tue 15 Feb 2011 14:59, edited 1 time in total.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 28 Oct 2009 10:08

Please specify what problems you have with Microsoft SQL Server.

cxg417
Posts: 41
Joined: Thu 26 Mar 2009 08:07

Post by cxg417 » Wed 28 Oct 2009 11:40

The Same Code,The Same Data Structure,There is no problem when connect MS SQL.
Please Concern this problem about call RefreshRecord.
________
Herbalaire
Last edited by cxg417 on Tue 15 Feb 2011 14:59, edited 1 time in total.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 29 Oct 2009 07:55

Probably there is the same problem:

Your query should contain key fields to perform RefreshRecord. UniDAC adds values of key fields to the WHERE clause of the generated SELECT statement.
UniDAC cannot generate the correct SQL statement to refresh record in a query with UNION. You should set a value to the SQLRefresh property manually.

Post Reply