Recent

Author Topic: Firebird 2.5 and ubdateSql  (Read 2521 times)

ahmetnurideniz

  • Full Member
  • ***
  • Posts: 110
  • As you sow, you shall reap.
    • Big Student Web Site
Firebird 2.5 and ubdateSql
« on: November 30, 2011, 10:08:04 pm »
Hi,
I am useing Firebird 2.5, Lazarus 0.9.30  and SQLQuery
I can connect db. I can do everything first.
I set parsesql is true.
then I right click SQLQuery and select edit fields. 
I added the all fields but after I add fields parsesql  is not generate update delete and insert sqls.
When I add update sqls from my codes.
Code: [Select]
      UPDATE LISTS SET LISTS_ID=:LISTS_ID, LISTS_FINDS=:LISTS_FINDS, LISTS_REPLACE=:LISTS_REPLACE, LISTS_COMMENT=:LISTS_COMMENT
WHERE LISTS_ID=:Old_LISTS_ID;
         
                   


But there is error message. Error message is
field not found Old_LISTS_ID

Where is my mistakes ?


joseme

  • Full Member
  • ***
  • Posts: 128
    • Logosoft sistemas
Re: Firebird 2.5 and ubdateSql
« Reply #1 on: December 01, 2011, 12:34:04 am »
LISTS_ID is your key field, it should not be updated.
The SQL text should be as follows:
Code: [Select]
      UPDATE LISTS SET LISTS_FINDS=:LISTS_FINDS, LISTS_REPLACE=:LISTS_REPLACE, LISTS_COMMENT=:LISTS_COMMENT
WHERE LISTS_ID=:OLD_LISTS_ID;
         
un aporte a la comunidad:
http://pascalylazarus.blogspot.com/

ahmetnurideniz

  • Full Member
  • ***
  • Posts: 110
  • As you sow, you shall reap.
    • Big Student Web Site
Re: Firebird 2.5 and ubdateSql
« Reply #2 on: December 01, 2011, 12:16:00 pm »
thansk it is working.

 

TinyPortal © 2005-2018