SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
The stored procedure cannot return the reason for the error

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
The stored procedure cannot return the reason for the error
Author Message
pfg1114



Joined: 30 Jun 2021
Posts: 29
Country: China

Post The stored procedure cannot return the reason for the error Reply with quote
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;




Mon Jul 19, 2021 10:24 pm View user's profile Send private message Send e-mail
gemisigo



Joined: 11 Mar 2010
Posts: 2100

Post Reply with quote
That's exactly what I told you would happen for the different connection types, here.
Wed Jul 21, 2021 3:00 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.