Strange RAISERROR Behaviour

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tulu
Posts: 7
Joined: Tue 13 Mar 2007 13:48

Strange RAISERROR Behaviour

Post by tulu » Thu 27 Dec 2007 10:08

I am using Delphi 5+4.30.0.13 version of SQL Server Data Access Components.

I develop code on a VM Win2K machine, and my users generally use XPs.

Much of the functionality of the system is in stored procedures and controlled by triggers.
Now I have a problem: when a trigger raises an error, the stored procedure also may report another error (Null value eliminated etc). On the development platform, both errors are shown on a dialog box.
On production platform, only the last error is shown, which is useless.


I am lost. What shall I do?

Edit: problem happens when I connect with DBConnection.Provider = prAuto. When I connect with prSQL, it works as expected. But I do not know what will not work in this case.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 27 Dec 2007 13:56

Could you send me a complete small sample at sdac*crlab*com to demonstrate this problem, including script to create database objects.

Also specify the exact version of SQL Server and client for both values of the Provider option. You can see it in the Info sheet of TMSConnection Editor.

tulu
Posts: 7
Joined: Tue 13 Mar 2007 13:48

Not much time.

Post by tulu » Thu 10 Jan 2008 15:36

Since I am a little bit short on time, I reverted to 3.80 version of SDAC. (Other problems happened with the application. Some queries stopped refreshing themselves, some grids started to behave peculiar..)

The sole reason I am interested in v 4.x was vista support. 3.80 does not work on vista, but 4.x does.

Anyway, currently I have no production systems on vista, thus could manage to go back.

Out of curiosity, I have downloaded the Microsoft server native client to my development environment, and viola! the same problem started to happen on the development machine too.

So I guess the problem is related to native clients way of handling error messages.

Interesting thing is v 3.8 just gives the message as : Unspecified error. I haven't noticed that before.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 11 Jan 2008 10:03

Please pay some time to reproduce this problem in a small application and send this application to us.
Your program with SDAC 4 should work on Vista if you set the Provider option of TMSConnection to prSQL. In this case SDAC will use SQL OLE DB client even if Native Client is installed.

Post Reply