Page 1 of 1

Two Errors When Use ASE Provider to connect SYBASE

Posted: Sat 17 Oct 2009 14:29
by cxg417
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

Posted: Mon 19 Oct 2009 10:29
by Plash
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.

Posted: Tue 20 Oct 2009 15:21
by cxg417
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

Posted: Wed 21 Oct 2009 08:20
by Plash
Please provide us a Pascal code that reproduces the problem.

Posted: Thu 22 Oct 2009 16:01
by cxg417
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

Posted: Thu 22 Oct 2009 16:06
by cxg417
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

Posted: Thu 22 Oct 2009 16:44
by cxg417
Sybase Version: ASE 12.5

Sybase ODBC Driver Version :syodase.dll 4.20.0.67
syodbas.dll 4.20.0.28
________
MEDICAL MARIJUANA CARD

Posted: Tue 27 Oct 2009 08:58
by Plash
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.

Posted: Tue 27 Oct 2009 15:17
by cxg417
Thank you for your reply

These problems are correct When connect SQL Server 2000
Data structure is the same as
________
Vtx1800c

Posted: Wed 28 Oct 2009 10:08
by Plash
Please specify what problems you have with Microsoft SQL Server.

Posted: Wed 28 Oct 2009 11:40
by cxg417
The Same Code,The Same Data Structure,There is no problem when connect MS SQL.
Please Concern this problem about call RefreshRecord.
________
Herbalaire

Posted: Thu 29 Oct 2009 07:55
by Plash
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.