firebird

How to resolve Firebird “unavailable database” error on a remote database?

喜夏-厌秋 提交于 2019-12-05 15:26:20
I have a Firebird 2.0 database running on a remote Windows XP PC. Using the ADO.net connection provider, I configure the connection as follows: Dim x As New FirebirdSql.Data.FirebirdClient.FbConnectionStringBuilder x.Database = "[hostname]:FileShare:/db/REMOTE_SVR.FDB" x.UserID = "SYSDBA" x.Password = "masterkey" Dim y As New FirebirdSql.Data.FirebirdClient.FbConnection(x.ConnectionString) y.Open() Attempting to open the connection raises an FbException , with the message "unavailable database". Downloading the ODBC drivers and attempting to connect with those settings produces the same error

Firebird and Entity Framework case sensitve table/column names

泄露秘密 提交于 2019-12-05 14:25:06
When working with Firebird I can query a table and its columns without worrying about case. If I want case sensitivity I can put the table/column name in quotes. The Firebird Entity Framework connector automatically puts quotes around names when generating queries, and as a result it forces case sensitivity on me. This means I have a bunch of [Table("SOMETABLE")] and [Column("DESCRIPTION")] all over the place because my existing table names are in all-caps. How can I tell the EF connector for Firebird to not be case sensitive? You can't. The names will be always quoted. You have to provide

Why Index is not used with subquery

大憨熊 提交于 2019-12-05 12:56:29
This takes 0.001 seconds to execute and it uses index seek SELECT * FROM CUSTOMER WHERE ID IN (1008,1122) Now I have a stored procedure U_VIP which returns the same ID as example one (1008,1122), and it takes only 0.001 second to execute SELECT ID FROM U_VIP //returns (1008,1122) Now when I combine them, it takes around half-a-second to execute and index is not used SELECT * FROM CUSTOMER WHERE ID IN (SELECT ID FROM U_VIP) I've simplified the example above, in actual application the performance is impacted by much higher magnitude. How to force Firebird to use index in this case? **Using

How to get the millisecond value from a Timestamp field in firebird with Delphi 2007

社会主义新天地 提交于 2019-12-05 10:31:15
I have a Firebird database (running on server version 2.1.3) and am connecting to it with Delphi 2007 using the DBExpress objects (using the Interbase driver) One of my tables in the database looks something like this CREATE TABLE MYTABLE ( MYDATE Timestamp NOT NULL, MYINDEX Integer NOT NULL, ... Snip ... PRIMARY KEY (MYDATE ,MYINDEX) ); I can add to the table OK, and in Flame Robin it shows the timestamp field as having a millisecond value. But when I do a select all ( select * from MYTABLE ) on the table I can not get the millisecond value, as it is always returned as 000. This causes major

Firebird usage in big projects [closed]

北城余情 提交于 2019-12-05 10:02:13
What abilites have firebird to use it in highloaded projects? Whats better PostgreSQL or FireBirdSQL? Any one know big projects which work with Firebird database and developed over it? Both Firebird and PostgreSQL are good choices. I think 'better' is highly subjective and not easy to answer for such a broad and unspecific question. The case-studies on firebirdsql.org lists some projects that might be of interest to you. It is however important to keep in mind that performance in general depends largely on the way your system interacts with the database, transaction management (and transaction

NullPointerException in Netbeans Hibernate Mapping Files and POJOs wizard from Firebird database

风流意气都作罢 提交于 2019-12-05 09:28:01
I'm developing a desktop application using netbeans, hibernate and firebird. The wizard does not give me trouble creating files hibernate.cfg.xml, or HibernateUtil.java But by trying: New -> Other -> Hibernate -> Hibernate Mapping Files and POJOs from Database, using my hibernate.cfg.xml and hibernate.reveng.xml the wizard throws the exception: Hibernate configuration fails with message: java.lang.NullPointerException message.log see exception for details. I'm using Product Version: NetBeans IDE 7.2.1 (Build 201210100934) Java: 1.7.0_11; Java HotSpot(TM) Client VM 23.6-b04 System: Windows XP

Best Embedded SQL DB for write performance?

爱⌒轻易说出口 提交于 2019-12-05 09:06:12
Has anybody done any benchmarking/evaluation of the popular open-source embedded SQL DBs for performance, particularly write performance? I've some 1:1 comparisons for sqlite, Firebird Embedded, Derby and HSQLDB (others I am missing?) but no across the board comparisons... Also, I'd be interested in the overall developer experience for any of these (for a Java app). This benchmark from db4o might be helpful. It includes, JavaDB (Built on top of Derby), HSQLDB, SqlLite. It seems HSQLDB out-performs its counterparts, especially when writing is concerned. H2, as a successor of HSQLDB, is faster

How can you detect a parent with a nested relationship in a database using SQL?

寵の児 提交于 2019-12-05 08:17:11
I'm using Firebird 2.1. There is a table name Folders , with the fields: FolderID ParentFolderID FolderName ParentFolderID is -1 if it's the root folder -- otherwise it contains the parent folder's ID. How can I find all parents (up to the root folder) of a low level node? Do I need a recursive query? ( Firebird supports them ) Something like this: WITH RECURSIVE hierarchy (folderid, ParentFolderId, FolderName) as ( SELECT folderid, ParentFolderId, FolderName FROM folders WHERE ParentFolderID = -1 UNION ALL SELECT folderid, ParentFolderId, FolderName FROM folders f JOIN hierarchy p ON p

Ways to Determine the Version of Firebird SQL?

喜夏-厌秋 提交于 2019-12-05 06:43:08
Exist any Way to Determine the Version of Firebird SQL is running? using SQL or code (delphi, C++). Bye If you want to find it via SQL you can use get_context to find the engine version it with the following: SELECT rdb$get_context('SYSTEM', 'ENGINE_VERSION') as version from rdb$database; you can read more about it here firebird faq , but it requires Firebird 2.1 I believe. Two things you can do: Use the Services API to query the server version, the call is isc_service_query() with the isc_info_svc_server_version parameter. Your preferred Delphi component set should surface a method to wrap

Is there any way to create a local table variable inside a Firebird stored proc?

柔情痞子 提交于 2019-12-05 06:20:19
In MS SQL Server, you can declare local variables of any primitive type, or of a table type. This table is a normal table that you can run SELECT , INSERT , UPDATE and DELETE on, just like any other table, except that it's a local variable, not a part of the database itself. I'm trying to do the same thing in Firebird, but it doesn't seem to like the syntax. declare variable value int; --works fine declare variable values table (value int); --Error: "Token unknown (table)" Is there any way to do this? (And before anyone says "use a selectable stored procedure," that won't work. I need