Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8691805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:11:53+00:00 2026-06-13T00:11:53+00:00

My table has this structure T_user(usern,pass,realname: varchar(50); I am a beginner in Firebird and

  • 0

My table has this structure T_user(usern,pass,realname: varchar(50);
I am a beginner in Firebird and I want to execute the following statements, but I get this error:

if (select Count(*) as cnt FROM T_USER WHERE ( usern = 'test') And (pass
= ']')) > 0  then  select T_user.realname from t_user where t_user.usern = 'test';

This is the error message:

Error: IBPP::SQLException Context: Statement::Prepare( if
(select Count(*) as cnt FROM T_USER WHERE ( usern = ‘test’) And (pass
= ‘]’)) > 0 then select T_user.realname from t_user where t_user.usern = ‘test’ ) Message: isc_dsql_prepare failed

SQL Message : -104 Invalid token

Engine Code : 335544569 Engine Message : Dynamic SQL Error SQL
error code = -104 Token unknown – line 1, column 1 if

I’m using Firebird 2.5 and FlameRobin.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:11:54+00:00Added an answer on June 13, 2026 at 12:11 am

    Try this code:

    EXECUTE BLOCK
      RETURNS (name VARCHAR(50))
    AS
      DECLARE VARIABLE C INTEGER;
    BEGIN
      select Count(*) 
      FROM T_USER 
      WHERE  usern = 'test' And pass = ']'
      INTO :C;
    
      IF (:C > 0) THEN
        select T_user.realname 
        from t_user 
        where t_user.usern = 'test'
        into :name;
      ELSE
        name = NULL;
    
      SUSPEND;
    END
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple table that has this structure: <table> <thead> <tr> <td>Some info</td>
How to iterate through table if it has this structure: <table> <tr> <td><input class
I have a table that has records with a structure similar to this.. ID
I have a table TreeStructures wich holds structures of Trees. This table has columns
i have a table called as X and this table has a field known
Lets say I have one table called REVIEWS This table has Reviews that customers
I have MySQL InnoDB table utf-8 encoded. This table has only id and name
I have a table in SQL Server. This table has an image field and
Let's say I have a table Foo . This table has the columns ID
I have a UITableView on a UIViewController. And this table has say 5 visible

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.