![SoftTree Technologies](templates/GreenTech/images/logo.gif) |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
pfg1114
Joined: 30 Jun 2021 Posts: 30 Country: China |
|
The stored procedure cannot return the reason for the error |
|
When the stored procedure has multiple result sets, if the second result set has an error, the Ado.net driver cannot display the cause of the error.
The source code is as follows:
= =======================================
delimiter $$
drop table if exists tb_test_1;
$$
create table tb_test_1(id int, testbit bit(1));
$$
insert into tb_test_1(id, testbit) values(1, true);
$$
drop procedure if exists proc_test;
$$
create procedure proc_test()
begin
-- The first result set:
select * from tb_test_1;
-- The second result set, but the table does not exist,
-- should report an error, but the Ado.net driver will not report an error.
-- If you use ODBC or mysql Native, it will report the cause of the error.
set @SqlStr = ' select * from tb_NotThisTable ';
prepare stmp from @SqlStr;
execute stmp;
deallocate prepare stmp;
end;
$$
delimiter;
![](https://i.postimg.cc/Mvr1mrH7/2021-07-20-092321.png)
|
|
Mon Jul 19, 2021 10:24 pm |
|
![](templates/GreenTech/images/spacer.gif) |
gemisigo
Joined: 11 Mar 2010 Posts: 2109
|
|
|
|
That's exactly what I told you would happen for the different connection types, here.
|
|
Wed Jul 21, 2021 3:00 am |
|
![](templates/GreenTech/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|