Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » ODBC Assertion failed
Re: ODBC Assertion failed [message #55813 is a reply to message #55812] Thu, 17 December 2020 14:09 Go to previous messageGo to previous message
JeyCi is currently offline  JeyCi
Messages: 50
Registered: July 2020
Member
Giorgio wrote on Thu, 17 December 2020 11:01
if (query.WasError())

I'm not sure that you should use 2 error checks - both "try_catch" & "if (query.WasError())"... I think WasError can be enough & you'd better try to do the whole necessary stuff here in this scope (including the one that you're trying to do in catch)... then "try_catch" seems unneeded for me...
I'm not sure but it seems to be excessive error checks when using both... because in catch-scope you are not correctly closing your connection to process the error that arrised, but still continue to utilize it (connection) for error checks again... imho


Best regards.

[Updated on: Fri, 18 December 2020 06:32]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: OleDBSession in Archive
Next Topic: sqlite3 Custom Function in SqlExp
Goto Forum:
  


Current Time: Sat Jun 15 20:56:20 CEST 2024

Total time taken to generate the page: 0.02476 seconds