firebird2.1

How can I temporarily disable all constraints in a Table in Firebird 2.1?

I want to disable all Foreign key constraints and re-enable them after, is there some way to do that? I know that SQLServer allows that, but what about Firebird? ...

Runtime Error R6034 when trying to use Firebird Server 2.1 on Windows Server 2003 (Cannot Load gds32.dll)

I'm getting this runtime error R6034 when I try to execute an application in a Windows 2003 Server. Microsoft Visual C++ Runtime Library Runtime Error! R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information. This s...

Program cannot reconnect to Firebird after abnormal termination

What can be done to prevent having to restart a PC after a program (C++Builder) terminated abnormaly without closing the database using firebird 2? What I am looking for: I would like to be able to just restart the program without any other intervention. (I could have the user call a batch file executing some cleanup or add some lines o...

Incorrect error messages in FB2.1

I have FB1.5 and FB2.1 installed in my computer. I´ve written a script to swich from one instance to another. It runs all ok, I access FB1.5 and 2.1 databases normally. My issue is, when I´m running 2.1 the error messages are incorrect, the following example illustrates the problem Invalid token. Dynamic SQL Error. SQL error code = @1....

Firebird 2.1 TIMESTAMP arithmetic and civil intervals

My understanding is that, in keeping with Interbase v6, Firebird 2.5 does not support the SQL-92 INTERVAL keyword. At least, so suggests this reference and my repeated SQLCODE -104 errors trying to get INTERVALs to work under Firebird's isql(1). How, then, do I account for the irregularities in our civil reckoning of time -- months are...

Using F_RoundToEven FreeAdhocUDF function fails with some numbers

I have noticed that when we use F_RoundToEven UDF from FreeAdhocUDF, that it fails to produce a correct result with certain numbers. For example, the query: select F_RoundToEven(21.145, 2) Correct, F_RoundToEven(215.145, 2) Fail from Rdb$Database produces the result: CORRECT FAIL 21.14 215.15 Obviously these two number shoul...

Firebird 2.1 + EXISTS = query bug?

Using Delphi 2009 + Firebird 2.1.3. Database is ODS 11.1, default char set is UTF8. My prepared query is as follows: SELECT a.po_id, a.po_no FROM purchase_order a WHERE EXISTS (SELECT 1 FROM sales_order_item z1 JOIN purchase_order_item z2 ON z2.so_item_id = z1.so_item_id AND z2.po_id = a...

maximum stored proc name in firebird

Hi, I am migrating my db from Interbase to Firebird, and the 1st hiccup we hit comes from our stored proc names. We have a handful of stored procedures with names greater than 31 characters (which appears to be the max in FB 2.1.3) Is there a way to increase this limitation? It will be a far easier solution than modifying our software...

Firebird query is crashing with org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544364. request synchronization error

I am using JdbcTemplate.queryForInt to insert a Row into the DB, and then get the ID back. The Query is "INSERT INTO metadocs(NAME) values (?) RETURNING METADOCID". If I run the statement in Flamerobin, it works fine. However, if I run it from Java, I get the following error: org.springframework.jdbc.UncategorizedSQLException: Prepare...

Delphi firebird autoinc

How do I make an autoinc field in firebird with Zeos. -Brad ...

Delphi: how to create Firebird database programmatically

I'm using D2K9, Zeos 7Alpha, and Firebird 2.1 I had this working before I added the autoinc field. Although I'm not sure I was doing it 100% correctly. I don' know what order to do the SQL code, with the triggers, Generators, etc.. I've tried several combinations, I'm guessing I'm doing something wrong other than just that for this not ...

How to get all the fields of a row using the SQL MAX function?

Consider this table (from http://www.tizag.com/mysqlTutorial/mysqlmax.php): Id name type price 123451 Park's Great Hits Music 19.99 123452 Silly Puddy Toy 3.99 123453 Playstation Toy 89.95 123454 Men's T-Shirt Clothing 32.50 123455 Blouse Clothing 34.97 123456 Elec...

What is the minimum firebird client installation to run .Net applications?

I followed all the steps suggested here Minimum Firebird Client Installation on Windows. However I haven’t managed to make my application to run yet. Does anyone have managed to run .Net applications only meeting the requirements described in such link? If not, what were the additional settings you had to make in order to achieve it? ...

JDBC Embedded Firebird: operating system directive failed

I'm writing a small java program that can read a .GDB file using the embedded Firebird server (libfbembed.so) on linux. I have all my paths correct: my classpath provides the Firebird classes, and my java library path provides the jaybird library. My connection string is: private String connectionString = "jdbc:firebirdsql:embedded:/...

Can you define a NULL on a column definition in the Create Table statement in a Firebird DB?

I am using SQL Manager Lite to try to run a DDL Create Table script. I am new to Firebird and I don't know why it isn't working. The following script... create table Contacts ( ID integer not null, FirstName varchar(64) not null, LastName varchar(64) ...

Firebird connection with java[Solved]

Hi, I have installed Firebird 2.1 on windows Xp and using firebirdsql.jdbc-2.1.6 driver to connect with java. Code: Class.forName("org.firebirdsql.jdbc.FBDriver"); connection = DriverManager.getConnection( "jdbc:firebirdsql://localhost/3050//C:/firebird/database/EMPLOYEE.FDB", "test","test"); I am getting following error: ...

Help with SQL query - some magic needed

Hi All! I need some help with a query - I'm using Firebird 2.1. I have a table like: RowID (primary key) | ActivityID | Duration | BilledAt 1 | 1 | 50 | 06.08.2010, 14:05:00.598 2 | 1 | 70 | 06.08.2010, 14:05:00.608 3 | 2 | 30 | 06.08.2010, 14:05:00.598 4 | 3 | 40 | 06.08.2010, 14:05:00.598 5 | 3 | 50 | 06.08.2010, 14:05:00.608 I'd...

How can I measure the amount of space taken by blobs on a Firebird 2.1 database?

I have a production database, using Firebird 2.1, where I need to find out how much space is used by each table, including the blobs. The blob-part is the tricky one, because it is not covered using the standard statistical report. I do not have easy access to the server's desktop, so installing UDFs etc. is not a good solution. How ca...

Insert null into not null column with default FIREBIRD

Inserting null into not null column with default is giving me a validation error instead of taking the default value. I don't want to make on before triggers to all of the tables. Is there any other way to do this? Firebird 2.1.3 ...

Trouble translating a SQL Server query to Firebird

I'm new to Firebird, and I'm having particular difficulty translating this T-SQL to Firebird SQL. This code is stored outside of the database, not in a stored procedure. DECLARE @NumTotal int DECLARE @NumUsed int SELECT @NumTotal = COUNT(*) FROM "some_Table" WHERE "CreatedOn"=@CreatedOn SELECT @NumUsed = COUNT(*) FROM "som...