firebird

Can I use the Firebird DateAdd function in the Where clause?

大城市里の小女人 提交于 2020-01-04 05:33:32
问题 In firebird can I use the DateAdd function in the where clause? I have the following sql; select s.number, s.warranty_start from serial_number s where s.warranty_start > dateadd(year, -3, 'now') I get error; expression evaluation not supported 回答1: Your third parameter is invalid. select s.number, s.warranty_start from serial_number s where s.warranty_start > dateadd(year, -3, current_timestamp) 'now' is a string literal that can only be used together with the date keyword, e.g. date 'now' .

Can I use the Firebird DateAdd function in the Where clause?

你离开我真会死。 提交于 2020-01-04 05:33:10
问题 In firebird can I use the DateAdd function in the where clause? I have the following sql; select s.number, s.warranty_start from serial_number s where s.warranty_start > dateadd(year, -3, 'now') I get error; expression evaluation not supported 回答1: Your third parameter is invalid. select s.number, s.warranty_start from serial_number s where s.warranty_start > dateadd(year, -3, current_timestamp) 'now' is a string literal that can only be used together with the date keyword, e.g. date 'now' .

String Truncation on Transfer to ClientDataset

瘦欲@ 提交于 2020-01-04 05:21:14
问题 I'm using Firebird 2.1, DBExpress Driver from DevArt and Delphi 2010. Some of my reports that used to work with Delphi 2006 stopped working and produced an error message indicating that "arithmetic exception, numeric overflow, or string truncation" had occurred. The error occurred at this point in my code: cds.Data := dsProvider.Data; I found the place in my SQL statement that caused the error: iif(ytd.hPayType <> -1,t.sCode, 'NET') sPayType T.sCode is a Varchar(10) field. My conclusion is

Creating table in Firebird script causes “unsuccessful metadata update” with deadlock

帅比萌擦擦* 提交于 2020-01-03 17:27:22
问题 I have the following script that I run using "isql -i scriptfile.sql": CONNECT C:\Databasefile.fdb USER user PASSWORD password; SET TERM !! ; EXECUTE BLOCK AS BEGIN IF (EXISTS(SELECT 1 FROM rdb$relations WHERE rdb$relation_name = 'MYTABLE')) THEN EXECUTE STATEMENT 'DROP TABLE MYTABLE;'; END!! SET TERM ; !! CREATE TABLE MYTABLE ( MYCOLUMN VARCHAR(14) NOT NULL ); The very first time I run this (when the table does not already exist) the table is created as expected. If I run the script again I

c# add data to firebird database

断了今生、忘了曾经 提交于 2020-01-03 04:59:09
问题 There is code that I use to pass new data to Database (firebird): FbConnection fbCon = new FbConnection(csb.ToString()); FbDataAdapter fbDAdapter = new FbDataAdapter("SELECT ID,name,score FROM players",fbCon); FbCommandBuilder Cmd = new FbCommandBuilder(fbDAdapter); DataSet DSet = new DataSet(); fbDAdapter.Fill(DSet); DataRow rw = DSet.Tables[0].NewRow(); rw["ID"] = zID + 1; rw["name"] = var; rw["score"] = score; DSet.Tables[0].Rows.Add(rw); fbDAdapter.Update(DSet); Maybe you can suggest

Problem with QIBASE (firebird + Ubuntu)

孤者浪人 提交于 2020-01-03 03:50:06
问题 Good morning. I've tried to compile QIBASE driver to access FireBird database using sqlbrowser from %QTDIR/demos. But after i filled all fields in sqlbrowser and pushed OK button the program crashed with message: /opt/qt-everywhere-opensource-src-4.7.3/demos/sqlbrowser-build-desktop/sqlbrowser: symbol lookup error: /usr/lib/qt4/plugins/sqldrivers/libqsqlibase.so: undefined symbol: isc_attach_database To compile QIBASE driver i've done following steps: Installing FirebirdCS-2.5.0 to /opt

Firebird dot net provider doesn't fully execute query?

橙三吉。 提交于 2020-01-02 23:14:10
问题 I'm running a number of SQL command using the dot net provider for Firebird in c#. Specifically I'm changing the database schema, and doing data updates and the like. As part of my processing I create a new table, run a query to copy data from an old table, and then drop the old table. When I do this firebird generates and error: unsuccessful metadata update object is in use I've done some looking and it seems like the query to copy the data hasn't been "cleared" our or something yet. What I

Firebird Database does not recognize unicode/cyrillic letters

前提是你 提交于 2020-01-02 23:04:56
问题 I really need someone's help with the encoding issue when trying to query Firebird tables. I am connecting to a firebird database using Firebird Maestro: The problem is that whenever I include Cyrillic letters in SQL Queries Firebird does not 'understand' them correctly. For instance, consider a query with some cyrillic letters: SELECT * FROM ROYALTY WHERE ROYALTY.PRIM = 'Кириллица' It does not return any values even though there is a row that contains 'Кириллица' value in a PRIM row. However

Firebird Database does not recognize unicode/cyrillic letters

心不动则不痛 提交于 2020-01-02 23:04:23
问题 I really need someone's help with the encoding issue when trying to query Firebird tables. I am connecting to a firebird database using Firebird Maestro: The problem is that whenever I include Cyrillic letters in SQL Queries Firebird does not 'understand' them correctly. For instance, consider a query with some cyrillic letters: SELECT * FROM ROYALTY WHERE ROYALTY.PRIM = 'Кириллица' It does not return any values even though there is a row that contains 'Кириллица' value in a PRIM row. However

SQlite/Firebird: Does any of them support multiple concurrent write access?

老子叫甜甜 提交于 2020-01-02 06:57:31
问题 Question: I currently store ASP.net application data in XML files. Now the problem is I have asynchronous operations, which means I ran into the problem of simultanous write access on a XML file... Now, I'm considering moving to an embedded database to solve the issue. I'm currently considering SQlite and embeddable Firebird. I'm not sure however if SQlite or Firebird can handle multiple concurrent write access. And I certainly don't want the same problem again. Anybody knows ? SQlite