darkwood001 / odbc

Automatically exported from code.google.com/p/odbc
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

in windows 8 on not working properly #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
in windows8 on not working properly, any insert, delete, execute stored 
procedures without any reaction, there is no change data in the database, but I 
did not see any error messages and prompts.

Original issue reported on code.google.com by Zuggie....@gmail.com on 13 Jun 2014 at 2:08

GoogleCodeExporter commented 9 years ago
Please, build small program to demonstrate, Something I can reproduce here. 
Would be nice if you follow this:

>>
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

Please use labels and text to provide additional information.
>>

Thank you.

Alex

Original comment by alex.bra...@gmail.com on 13 Jun 2014 at 3:51

GoogleCodeExporter commented 9 years ago
the example please see the file

Original comment by Zuggie....@gmail.com on 13 Jun 2014 at 7:46

Attachments:

GoogleCodeExporter commented 9 years ago
I will try it. Thank you.

Alex

Original comment by alex.bra...@gmail.com on 14 Jun 2014 at 2:19

GoogleCodeExporter commented 9 years ago
Zuggie.Zhu,

I just added new TestMSSQLExecStoredProcedure 
https://codereview.appspot.com/106030043 to demonstrate how to call stored 
procedure. I think it should cover your scenario. I'm closing this issue. 
Please, let me know, if you think there is more to your problem. Thank you.

Alex

Original comment by alex.bra...@gmail.com on 16 Jun 2014 at 3:19

GoogleCodeExporter commented 9 years ago
alex,I found the root cause, I write the store procedure like this:

begin try
 begin tran
 ......
 end tran
end try
begin catch
 rollback tran
end catch

when I use program call it,it can't run,so I modify it like this:

begin tran
 ......
 if @@error<>0
 begin
    rollback tran
 end
 commit tran
end tran

now it can running.

Original comment by Zuggie....@gmail.com on 16 Jun 2014 at 7:52

GoogleCodeExporter commented 9 years ago
Glad you have found your problem.

Alex

Original comment by alex.bra...@gmail.com on 16 Jun 2014 at 10:31