Home » U++ Library support » U++ SQL » truncated error message / MariaDB
truncated error message / MariaDB [message #58353] |
Fri, 06 May 2022 19:27 |
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!
|
|
|
Goto Forum:
Current Time: Thu May 16 20:16:01 CEST 2024
Total time taken to generate the page: 0.02456 seconds
|