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: 158
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
Goto Forum:
  


Current Time: Wed Jun 29 12:01:56 CEST 2022

Total time taken to generate the page: 0.01248 seconds