firebird

Firebird's SQL's Substring function not working

I created a view on a machine using the substring function from Firebird, and it worked. When I copied the database to a different machine, the view was broken. This is the way I used it: SELECT SUBSTRING(field FROM 5 FOR 15) FROM table; And this is the output on the machine that does not accept the function: token unknown: FROM B...

Generate Insert SQL statements from a csv file

I need to import a csv file into Firebird and I've spent a couple of hours trying out some tools and none fit my needs. The main problem is that all the tools I've been trying like EMS Data Import and Firebird Data Wizard expect that my csv file contains all the information needed by my Table. I need to write some custom SQL in the ins...

What are the advantages of VistaDB

I have seen the references to VistaDB over the years and with tools like SQLite, Firebird, MS SQL et. al. I have never had a reason to consider it. What are the benefits of paying for VistaDB vs using another technology? Things I have thought of: 1. Compact Framework Support. SQLite+MSSQL support the CF. 2. Need migration path to a 'm...

Firebird database replication

I have reached the point where I've decided to replace my custom-built replication system with a system that has been built by someone else, mainly for reliability purposes. Can anyone recommend any replication system that is worth it? Is FiBRE any good? What I need might be a little away from a generic system, though. I have five depar...

ID-ing Deadlocks in a Thread using Firebird

Developer looking for best method to identify a deadlock on a specific transaction inside a specific thread. We are getting deadlock errors but these are very general in FB 2.0 Deadlocks happening and they are leading to breakdowns in the DB connection between client and the DB. We send live ( once a second) data to the DB. We open a ...

What do I need to start using Embedded Firebird with Delphi?

I wan a good lightweight FOSS embedded database to use with Delphi. I've used DBISAM by Elevate Software for years and I just love it, but I like to share the source on some of my utilities, and it is closed source commercial. Someone suggested Embedded Firebird as a FOSS alternative. Where do I get components to use it with Delp...

SQLite / Firebird embedded for numeric data

I have an experiment streaming up 1Mb/s of numeric data which needs to be stored for later processing. It seems as easy to write directly into a database as to a CSV file and I would then have the ability to easily retrieve subsets or ranges. I have experience of sqlite2 (when it only had text fields) and it seemed pretty much as fast ...

How to test for object existence in Firebird SQL?

I need to test whether various types of database objects exist in a given database, and I don't know how to formulate these tests in Firebird SQL. Each test has the form "Does object of type X with name Y exist?". For example, I need to test whether a table with a given name exists. The object types I need to test are: Table View Dom...

In Installshield, what is the best event to use to launch applications only on install, not on uninstall or repair?

We have recently moved back to InstallShield 2008 from rolling our own install. So, I am still trying to get up the learning curve on it. We are using Firebird and a usb driver, that we couldn't find good msi install solutions. So, we have a cmd line to install firebird silently and the usb driver mostly silently. We have put this cod...

Firebird 1.5.3: How to add FK with connected users to the DB?

I use FB1.5.3 and need to eventually add some FK to the database. It happens that if I try to do it while anyone else is connected to the DB I get an exception. Is there a way to add an FK while the system is running? ...

Using CURRENT_TIMESTAMP, arithmetic operator and parameter with Firebird

Hi, Why doesn't this work (when parameter is set to 1): SELECT * FROM TABLE WHERE TIMESTAMPFIELD > (CURRENT_TIMESTAMP - ?) But this works: SELECT * FROM TABLE WHERE TIMESTAMPFIELD > (CURRENT_TIMESTAMP - 1) I get error message: "conversion error from string "39723.991882951" " I'm using Firebird 2.1 EDIT: I found the answer myself...

Firebird stored procedure solution

Hi, my goal is to write a stored proc that can collect all field values from multiple rows into one single output variable (maybe varchar(some_length)). It may seem strange solution but i've quite positive its the only one i can use at that situation im in. I have not used Firebird before and stored procs look way different than in other...

How much compatibility do the DB engines have at the SQL level?

Let's say I wanted to have an application that could easily switch the DB at the back-end. I'm mostly thinking of SQL Server as the primary back-end, but with the flexibility to go another DB engine. Firebird and PostGreSQL seem to have (from my brief wikipedia excursion) the most in common w/ SQL Server (plus they are free). How simil...

Article on using Firebird.NET in a WinForms application

Hi all, Can anyone provide me with a link to good article about using Firebird.NET with a WinForms application? A simple google search did not yield good results - I am looking for a step-by-step guide which will help me to quickly a few things and am not sure the documentation is a good place to start. Thanks in advance. Anindya...

Delphi 2009 and Firebird 2.1 = Full Unicode?

Has anyone started making Unicode Apps or converting Existing Apps into Unicode? How are you tweaking Firebird to have the least problems, especially the CHARSET attribute? Is there any problem encountered? Any thing else that I should be aware of? I'm just preparing myself so that I get less surprises, before jumping onto the Unicode...

Database (and ORM) choice for an small-medium size .NET Application

Hi I was hoping to get some advice from the panel. I have a requirement to develop a .NET-based application whose data requirements are, in the future, likely to exceed the 4 gig limit of SQL 2005 Express Edition. There may be other customers of the same application in the future witwh a requirement to use a specific DB platform (such...

What is the correct/ fastest way to update/insert a record in sql (Firebird/MySql)

I need some SQL to update a record in a database if it exists and insert it when it does not, looking around there looks to be several solutions for this, but I don't know what are the correct/ accepted ways to do this. I would ideally like it to work on both Firebird 2 and MySQL 5 as the update will need to be ran against both database...

Conflicting CASCADE and RESTRICT foreign key requirements?

I'm working on a database that tracks files and dependencies in projects. Briefly, I have two main tables; the PROJECTS table lists project names and other properties, the FILES table lists files. Every file entry points to a project as a foreign key set to CASCADE, so if I delete a project record from the database, all the file records ...

Combining UNION ALL and ORDER BY in Firebird

This is my first attempt at answering my own question, since someone may well run into this and so it might be of help. Using Firebird, I want to combine the results of two queries using UNION ALL, then sort the resulting output on a given column. Something like: (select C1, C2, C3 from T1) union all (select C1, C2, C3 from T2) order b...

How do I setup NHibernate with Visual Studio and Firebird??

I'm trying to set up a small app to experiment with NHibernate in visual studio but I'm not getting far. The error I get is: "Could not find the dialect in the configuration". I've tried specifying settings in both app.config and hibernate.cfg.xml but neither seems to work. These files are in the same directory as my app source (tried...