firebird

Firebird - handling exception's custom-message [duplicate]

匆匆过客 提交于 2020-01-06 01:18:49
问题 This question already has answers here : In FirebirdSql, how to return exception message from procedure (2 answers) Closed 2 years ago . I am using Firebird 2.5. I'm trying to handle user defined exception custom message in a stored procedure. I have two procedures. The first one raise exception with additional information (custom exception message). The second one selects data from the first one and it is trying to handle the exception. I have problem with reading the custom message of the

Pros and Cons of different Schema designs for tables that all have a relationship to one data item

一世执手 提交于 2020-01-05 08:17:11
问题 I am developing a system that will have a database backend. I am intending that every table have a PK that is arbitary, system generated and maintained. My environment (for development and production) is Windows 7; Delphi; and an embedded database (probably Firebird). My data structures include one table OWNER, that has very little information associated with it - probably no more than name and description. The rest of the data structure will be about 50 tables, each with name and description

Firebird 3.0 on Ubuntu Xenial fails to start

我们两清 提交于 2020-01-05 05:46:07
问题 I'm trying to install Firebird 3.0 on Ubuntu xenial. I'm using this command to check the server status: Job for firebird3.0.service failed because a configured resource limit was exceeded The answers is this: ● firebird3.0.service - Firebird Database Server ( SuperServer ) Loaded: loaded (/lib/systemd/system/firebird3.0.service; disabled; vendor preset: enabled) Active: failed (Result: resources) since Sex 2016-07-01 14:52:03 BRT; 5min ago Process: 8596 ExecStart=/usr/sbin/fbguard -pidfile

crosstab: Counting the same string in a field and display it as field name

南笙酒味 提交于 2020-01-05 04:37:07
问题 I would like to have a total of specific string in the field, for this example in the PAYROLL_PAYMONTH field. For example, I will count the number of 'HELLO' in the field and display it in a group. -- DATA EMP_SURNAME PAYROLL_PAYYEAR PAYROLL_PAYMONTH X 1999 JAN X 1999 JAN X 1999 FEB -- OUTPUT EMP_SURNAME PAYROLL_PAYYEAR JAN FEB MAR X 1999 2 1 0 For counting the same string in a field and display it I made a group select procedure in Firebird 3 using SQL Manager for Firebird CREATE PROCEDURE

How to REVOKE ROLE GRANTED BY another user on Firebird 2.5.8?

爱⌒轻易说出口 提交于 2020-01-05 03:47:25
问题 I am working with Firebird 2.5.8, ODS Version 11.2, connecting via Firebird ADO.NET v6.6 (in C# using Visual Studio). I have built a database management tool for configuring our tables, as well as performing some basic Firebird user management operations. The database has different roles (MyRoleX and MyRoleY) defined to give/restrict access. User management operations include granting/revoking these roles to different users. When logged into the tool, the connection uses the RDB$ADMIN ROLE

How to REVOKE ROLE GRANTED BY another user on Firebird 2.5.8?

大兔子大兔子 提交于 2020-01-05 03:47:21
问题 I am working with Firebird 2.5.8, ODS Version 11.2, connecting via Firebird ADO.NET v6.6 (in C# using Visual Studio). I have built a database management tool for configuring our tables, as well as performing some basic Firebird user management operations. The database has different roles (MyRoleX and MyRoleY) defined to give/restrict access. User management operations include granting/revoking these roles to different users. When logged into the tool, the connection uses the RDB$ADMIN ROLE

INSERT SELECT in Firebird

荒凉一梦 提交于 2020-01-04 15:28:26
问题 I'm new to firebird and I have verious issues. I want to insert various lines into a table selected from another table. Here's the code: /*CREATE GENERATOR POS; */ SET GENERATOR POS TO 1; SET TERM ^; create trigger BAS_pkassign for MATERIAL active before insert position 66 EXECUTE BLOCK AS declare posid bigint; select gen_id(POS, 1) from RDB$DATABASE into :posid; BEGIN END SET TERM ; ^ INSERT INTO MATERIAL ( /*ID */ LOCATION, POSID, ARTID, ARTIDCONT, QUANTITY ) SELECT 1000, ':posid', 309, BAS

INSERT SELECT in Firebird

∥☆過路亽.° 提交于 2020-01-04 15:28:03
问题 I'm new to firebird and I have verious issues. I want to insert various lines into a table selected from another table. Here's the code: /*CREATE GENERATOR POS; */ SET GENERATOR POS TO 1; SET TERM ^; create trigger BAS_pkassign for MATERIAL active before insert position 66 EXECUTE BLOCK AS declare posid bigint; select gen_id(POS, 1) from RDB$DATABASE into :posid; BEGIN END SET TERM ; ^ INSERT INTO MATERIAL ( /*ID */ LOCATION, POSID, ARTID, ARTIDCONT, QUANTITY ) SELECT 1000, ':posid', 309, BAS

How do I optimize table after delete many records

一世执手 提交于 2020-01-04 09:12:29
问题 I deleted many records from my table but the DB size (Firebird) left the same. How do I decrease it? I am looking for something similar to vacuum in PostgreS. 回答1: This is one of many pains of firebird. Best and only effective and right way to do this - backup/restore your database using gbak 回答2: Firebird will occasionally run a sweep to remove the records from indexes etc., and regain the space for other use. In other words, as soon as the sweep has run, you will have the same performance

Firedac select working with Firebird returns no records

混江龙づ霸主 提交于 2020-01-04 05:45:19
问题 Hello I'm working with Firedac (Delphi Seattle) using Firebird (2.5) as a database, when I run this query using a TFDQuery, no records are returned: SELECT ID FROM USERS WHERE PWD = 'êHÆ–!+' The same query within a Database program as IbExpert return one record. Is there some parameter with Firedac components to configure that can solve this issue. Thanks. 回答1: It's in the query string and it's the ! char. By default, query strings are preprocessed, and you must escape constant chars like ! ,