Recent

Author Topic: ODBC Error  (Read 442 times)

Ylmith

  • Newbie
  • Posts: 1
ODBC Error
« on: January 27, 2025, 01:05:23 pm »
Hello,
i work on an app connecting with an Access database, i've been stuck for 2 days with an error message from the ODBC driver
"...SQL error; record 1: SqlState : 42000; native error -3503..."
It is an update on a table, the ODBC doc says that it is either a violation access or an error in the sql string.

I have another table for test and i can perfectly make the update with the same code.
Can you see a difference between the script of the 2 updates...?

(It's a Case Of)

-- works perfectly fine
 'Test' : Result:= 'UPDATE t_ach_TEST SET t1=:UP1x,t2=:UP2x,t3=:UP3x,t4=:UP4x,t5=:UP5x,t6=:UP6x,t7=:UP7x,'+ //7
  't8=:UP8x,t9=:UP9x,t10=:UP10x,t11=:UP11x,t12=:UP12x,t13=:UP13x,t14=:UP14x ' + //7
  'WHERE lignes =:UP0x '; //1   

-- error message
 'Para' : Result:= 'UPDATE t_ach_PARA SET annee=:UP1x,mois=:UP2x,jour=:UP3x,topic=:UP4x,items1=:UP5x,items2=:UP6x,moypay=:UP7x,' + //7
  'magasin=:UP8x,adresse=:UP9x,tel=:UP10x,mail=:UP11x,guar=:UP12x,euros=:UP13x,note=:UP14x ' + //7
  'WHERE lignes =:UP0x '; //1     

Thank you so much...





« Last Edit: January 27, 2025, 01:07:48 pm by Ylmith »

Zvoni

  • Hero Member
  • *****
  • Posts: 2897
Re: ODBC Error
« Reply #1 on: January 27, 2025, 02:26:43 pm »
And i'm pretty sure, that after the "native error -3503" there comes a lot more information in the error message.

Because the SQL-Statements themselves look good.
What are you using for the Parameters?
An idea might be sending a String, where an integer is expected

And what ist that "Case of"?

EDIT: And which driver do you use?
« Last Edit: January 27, 2025, 02:30:28 pm by Zvoni »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

 

TinyPortal © 2005-2018