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 » truncated error message / MariaDB
truncated error message / MariaDB [message #58353] Fri, 06 May 2022 19:27
BetoValle is currently offline  BetoValle
Messages: 203
Registered: September 2020
Location: Brasil Valinhos SP
Experienced Member
Hi,

I was systematically using the "GetLastError" function to catch error but I realized these days that I was displaying incomplete content. However I did a test with the "GetErrorStatement" function and it returned the expected content. I have to use the 2 (conditioning if there is content for "GetErrorStatement" then it will be displayed, otherwise use "GetLastError").
I'm confused now!

What do you consider?


    try
    {
      emTransacao = true;
      ret = ( this->*func ) ( vini );
    }
    catch ( SqlExc )
    {
      msg << db.session.GetLastError();
    }
    
      // msg show: Unknown column 'Obsxxx' in 'field list'




    catch ( SqlExc )
		{
       msg << db.session.GetErrorStatement()
       
    }
    
    // msg show: Unknown column 'Obsxxx' in 'field list'(1054): UPDATE SPFOBAASS Set Obsxxx = '123XXXccc',DataSistema = '2022- 
         05-06 1 4:01:58', HoraSistema = '2022-05-06 14:01:58', Usuario = 'eu' Where Codigo='GGG' and DataInicial="2022-02-01"



Thanks!


Previous Topic: SQL EXPR NOT WORKING
Next Topic: PostgreSQL and clang: error: linker command failed with exit code 1 on MacOS X
Goto Forum:
  


Current Time: Wed Apr 24 01:57:17 CEST 2024

Total time taken to generate the page: 0.03680 seconds