firebird

ADO returns wrong order of magnitude

杀马特。学长 韩版系。学妹 提交于 2019-12-11 08:32:34
问题 i'm writing a VBA macro for Excel 2003. I'm importing various data from a sql database to the Excel sheets. I tried two ways to do that: QueryTables.Add(...) with ADO I was in favour of ADO, because it seemed to be the 'better' or 'cleaner" solution. Everything worked well until i tried to get a numeric value with ADO out of the database. Instead of returning the value 1842,47078 it returned 0,01842 . (just to show what i mean) Strange thing is: when i try it with QueryTables.Add(...) i get

Translating query from Firebird to PostgreSQL

自古美人都是妖i 提交于 2019-12-11 08:17:31
问题 I have a Firebird query which I should rewrite into PostgreSQL code. SELECT TRIM(RL.RDB$RELATION_NAME), TRIM(FR.RDB$FIELD_NAME), FS.RDB$FIELD_TYPE FROM RDB$RELATIONS RL LEFT OUTER JOIN RDB$RELATION_FIELDS FR ON FR.RDB$RELATION_NAME = RL.RDB$RELATION_NAME LEFT OUTER JOIN RDB$FIELDS FS ON FS.RDB$FIELD_NAME = FR.RDB$FIELD_SOURCE WHERE (RL.RDB$VIEW_BLR IS NULL) ORDER BY RL.RDB$RELATION_NAME, FR.RDB$FIELD_NAME I understand SQL, but have no idea, how to work with this system tables like RDB

C# Encode connection string from win1251 to utf8 and back

孤街浪徒 提交于 2019-12-11 07:31:33
问题 I'm trying to work around the problem with connection string encoding in Firebird .net provider ver >= 5.6.0.0 (current is 5.8.0.0). The full description of the problem (if you are interested in) is here, but I think I could explain it briefly. So let's start! I have a system default encoding win1251 and a connection string that contains a param calls " DbPath " with value "F:\\Рабочая\\БД\\2.14.1\\January_2017\\MYDB.IB" When I pass this connection string to firebird .net provider it takes

Enable PHP Firebird connection

时间秒杀一切 提交于 2019-12-11 07:13:53
问题 I have to create PHP web service with Firebird db . This is the first time I configure connection with this db and I cant get it right. I followed every instructions from php manual site, copied neccesry dll files to win/syste32 folder etc. and it's not working. I dont understand this part: Use --with-pdo-firebird[=DIR] to install the PDO Firebird extension, where the optional [=DIR] is the Firebird base install directory. $ ./configure --with-pdo-firebird Where should I run this? 回答1: These

How to extract plain text from RTF string using Firebird SQL

亡梦爱人 提交于 2019-12-11 07:13:15
问题 I have RTF strings stored in a blob field in my database table. Example 1: The following blob RTF string stores plain text - 'Gluten, oeufs, lait, fruits à coque': {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 Tahoma;}{\f1\fnil Tahoma;}}{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\lang4108\f0\fs16 Gluten, oeufs, lait, fruits \'e0 coque\f1\par} Example 2: {\rtf1\ansi\ansicpg1252\deff0\deflang4108{\fonttbl{\ \fnil\fcharset0 Tahoma;}{\f1\fnil Tahoma;}}{\*\generator

Delete duplicated records Firebird SQL

巧了我就是萌 提交于 2019-12-11 06:45:41
问题 I want to delete duplicated rows, so I used this select statement to find all duplicated rows. SELECT * FROM MY_CARD T1 INNER JOIN( SELECT IDCARD, YEAR FROM MYCARD GROUP BY IDCARD, YEAR HAVING COUNT(IDCARD) > 1 ) T2 ON T1.IDCARD = T2.IDCARD AND T1.YEAR=T2.YEAR WHERE T1.IDRODZ = 5 AND IDCARD=80; My result looks like that, but this is only short example, there are more duplicated records. ID IDCARD YEAR IDRODZ 1 80 2014 5 2 80 2014 5 3 80 2014 5 4 80 2015 5 5 80 2015 5 6 80 2015 5 I need delete

Using parameter in PSQL

ぃ、小莉子 提交于 2019-12-11 06:44:23
问题 I have a problem with using parameter in psql. How to properly use the parameter in where clause. There are no errors compiling the procedure which I listed below. But no results when I pass 'bla bla bla' string. CREATE PROCEDURE SELECTCATALOGUE ( TXT VARCHAR(30)) RETURNS ( CODE VARCHAR(9), NAME VARCHAR(50)) AS BEGIN for execute statement 'select code,name from catalogue where name='||:TXT into :CODE,:NAME do suspend; END But, when I execute this procedure by replacing the parameter for

Firebird 2.5 reports “is not a valid database” although it is

佐手、 提交于 2019-12-11 06:37:36
问题 I've got two computers both running Firebird (let's called them A and B) and two database files (let's call them a.fdb and b.fdb), both copied to both computers. On B I get the message b.fdb is not a valid database The other files work, on A both files work. This would be easy to explain, if B was an older version, but it's a newer one (it was FB 2.1, and because of this problem I installed FB 2.5). The files a.fdb and b.fdb have ODS 11.1 and 10.1, respectively. It looks like new versions of

CLUSTER command for Firebird?

本小妞迷上赌 提交于 2019-12-11 06:36:00
问题 PostgreSQL has a CLUSTER command that can defrag the data on-demand rather than automatically which kills write speed. Can Firebird CLUSTER on demand? (I can't find it in the docs, and google searches come up well short. Pretty cars tho) 回答1: There is no such command for Firebird (which is also the reason you can't find it). Firebird doesn't have clustered indexes, and doesn't have a way to 'fake' them like PostgreSQL does. 来源: https://stackoverflow.com/questions/19389228/cluster-command-for

Install both Interbase and Firebird

橙三吉。 提交于 2019-12-11 05:55:40
问题 Are there any conflicts if both Interbase and Firebird are installed on the same workstation? Does anyone have any tips or best practices for this? 回答1: Interbase uses port 3050 by default. So, you have to choose another number for Firebird server on the same machine. Port number is specified through firebird.conf file. You have to restart Firebird service after changing conf file. Actually I have four different versions of FB running on my development computer. In this case every instance