firebird2.5

c# DataSet.Fill dreadful performance issues with Firebird 2.5

烂漫一生 提交于 2019-12-20 05:38:30
问题 REMARK I completely rewrite the question as while exploring options and getting insights, I realized the origin of my problem was not at all what I thought. I use Firebird as a database engine and the standard .Net provider (v.5.11.0) to fetch data using following code: // myBlob1 is BLOB SUB_TYPE 1 (text field) with some empty, but some // VERY long stuff (xml-content) which exceeds VARCHAR(32765), but I removed // those before performing my tests!!! var tick = Stopwatch.StartNew();

How to use non-ascii character string literals in firebird sql statements?

依然范特西╮ 提交于 2019-12-20 04:34:52
问题 I want to use non-ascii character string literals in a firebird sql query. So I used FlameRobin to see if it works first: I used something like this: SELECT NAME FROM TABLE1 WHERE NAME = 'العربية' I also tried: SELECT NAME FROM TABLE1 COLLATE UNICODE_CI_AI WHERE NAME = 'العربية' with no success. Because I have declared NAME using UTF8 Character Set and UNICODE_CI_AI Collation. from this referential url link: https://firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html

Using Reserved Word TimeStamp as a field name (Firebird 2.5)

喜夏-厌秋 提交于 2019-12-19 09:13:12
问题 I am extending the data layer of an existing application to work with Firebird 2.5, in addition to MSSQL and SQLite, but I have hit a stumbling block. I have a field called TimeStamp which stores the data/time as type TimeStamp. This works fine under MSSQL and SQLite where the type is datetime, but falls over under Firebird. The following SQL: SELECT SysTrnId,'TimeStamp' from "TRANSACTIONS" seemingly works, but the TimeStamp field is return as fieldname "CONSTANT" and the contents are the

Using Reserved Word TimeStamp as a field name (Firebird 2.5)

十年热恋 提交于 2019-12-19 09:12:56
问题 I am extending the data layer of an existing application to work with Firebird 2.5, in addition to MSSQL and SQLite, but I have hit a stumbling block. I have a field called TimeStamp which stores the data/time as type TimeStamp. This works fine under MSSQL and SQLite where the type is datetime, but falls over under Firebird. The following SQL: SELECT SysTrnId,'TimeStamp' from "TRANSACTIONS" seemingly works, but the TimeStamp field is return as fieldname "CONSTANT" and the contents are the

How to SELECT a PROCEDURE in Firebird 2.5

穿精又带淫゛_ 提交于 2019-12-19 06:03:09
问题 I'm using Firebird Embedded v2.5. How to use procedures in query (SELECT) ? My procedure: SET TERM ^ ; CREATE PROCEDURE FN_TEST( Y INTEGER ) RETURNS( X INTEGER) AS BEGIN X = Y + 1; END^ SET TERM ; ^ I want to list some field of table modified by some procedure, like this: SELECT some_table_field_1, fn_test( 4 ) AS zzz, some_table_field_2, fn_test( some_table_field_2 ) AS field_2_modified FROM tb_test Need results (table): some_table_field_1 zzz some_table_field_2 field_2_modified ------------

How to SELECT a PROCEDURE in Firebird 2.5

六眼飞鱼酱① 提交于 2019-12-19 06:02:04
问题 I'm using Firebird Embedded v2.5. How to use procedures in query (SELECT) ? My procedure: SET TERM ^ ; CREATE PROCEDURE FN_TEST( Y INTEGER ) RETURNS( X INTEGER) AS BEGIN X = Y + 1; END^ SET TERM ; ^ I want to list some field of table modified by some procedure, like this: SELECT some_table_field_1, fn_test( 4 ) AS zzz, some_table_field_2, fn_test( some_table_field_2 ) AS field_2_modified FROM tb_test Need results (table): some_table_field_1 zzz some_table_field_2 field_2_modified ------------

In FirebirdSql, how to return exception message from procedure

♀尐吖头ヾ 提交于 2019-12-17 14:01:28
问题 I want to return the error message from a procedure when an exception happens. In SQL Server you would select the Error_Number() and Error_Message(). How would I do it in FirebirdSql SET TERM ^ ; CREATE PROCEDURE sprocname ( id int ) RETURNS ( gcode int, errmsg varchar(250) ) AS BEGIN gcode = 0; errmsg = ''; -- do procedure code here WHEN ANY DO BEGIN gcode = gdscode; -- ?? errmsg = ??; END SUSPEND; END^ SET TERM ; ^ 回答1: Unfortunately you will need to do that at the client side, as it is

Update a table with join?

独自空忆成欢 提交于 2019-12-17 13:25:30
问题 I am trying to update table A with data from table B. I thought I can do something like this update A set A.DISCOUNT = 3 from INVOICE_ITEMS A join ITEM_PRICE_QUNTITY B on A.ITEM_PRICE_NO = B.ID where A.INVOICE_ID = 33 but getting error SQL Message : -104 Invalid token can anyone help me? 回答1: It is not possible to do this with a JOIN . The Firebird UPDATE statement has no FROM clause. The syntax is: UPDATE {tablename | viewname} [[AS] alias] SET col = newval [, col = newval ...] [WHERE

Update a table with join?

坚强是说给别人听的谎言 提交于 2019-12-17 13:25:30
问题 I am trying to update table A with data from table B. I thought I can do something like this update A set A.DISCOUNT = 3 from INVOICE_ITEMS A join ITEM_PRICE_QUNTITY B on A.ITEM_PRICE_NO = B.ID where A.INVOICE_ID = 33 but getting error SQL Message : -104 Invalid token can anyone help me? 回答1: It is not possible to do this with a JOIN . The Firebird UPDATE statement has no FROM clause. The syntax is: UPDATE {tablename | viewname} [[AS] alias] SET col = newval [, col = newval ...] [WHERE

Select from execute block?

杀马特。学长 韩版系。学妹 提交于 2019-12-13 15:02:21
问题 Is is possible to select from execute block result? I want to perform some operation (sum etc..) from it. select t1.* from ( execute block returns ( OUT_VALUE integer ) as begin ... suspend; end ) t1 or with t1 as ( execute block ... ) select * from t1 order by t1.sort_column Neither does not work. Anyone has an advice? Thanks! 回答1: You should create an independent stored procedure like create procedure proc1 returns ( OUT_VALUE integer ) as begin ... suspend; end and then select on this proc