Another Firebird/delphi problem

Posted on 2007-08-08
Last Modified: 2013-12-09
I want to update a record of a field.

i have a table "people" with some fields and one of them has the name counter and it has a value for example 123 and i want with delphi to update this value and set it to 0.

I do this

 IBQuery2.SQL.Text:='UPDATE people SET COUNTER="0"';

but i get an error:
Sql error code=-206
column unknown
Question by:alex_code
    LVL 19

    Accepted Solution

    COUNTER suggests that the field is an integer

    I'd expect something like:  IBQuery2.SQL.Text:='UPDATE people SET COUNTER=0';
    LVL 21

    Expert Comment

    is counter name of field in table people?

    LVL 9

    Author Comment

    MerijnB yes you are right, i am an idiot i know that the " " is for a string and if the field is an integer you put it without " "  but my mind maybe stops working for a few minutes ;)

    i remove the "" and it is ok now!

    thank you MerijnB.

    thank you ziolko for the post again.
    LVL 19

    Expert Comment

    just to be pedantic its ' ' around a string not " "
    LVL 9

    Author Comment

    Yes, thank you NickUpson for the post ;)

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
    I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now