firebird

Executing a script using ISQL

我们两清 提交于 2019-12-04 11:39:04
问题 I'm creating a simple isql script but it's not working and I need some help to find out whats wrong with it. I need to connect to a database and execute a SQL file. This is my script called script.sql: CONNECT 'localhost:C:\Monde\Servidor\db\monde.fdb' USER 'SYSDBA' PASSWORD 'masterkey'; update usuario set senha = 'MYkWEn0kHLHHdm' where login = 'rose' When I try to connect to my database using.: isql.exe -i script.sql I get this follow message.: Use CONNECT or CREATE DATABASE to specify a

How to execute transactions (or multiple sql queries) in firebird using c#

徘徊边缘 提交于 2019-12-04 11:31:05
I have tried several ways, including on SO. The following MYSQL code does not work in Firebird: CREATE TABLE publications ( INT NOT NULL AUTO_INCREMENT , PRIMARY KEY (`id`), filename varchar(500) not null unique, title varchar(500) DEFAULT NULL, authors varchar(1000) DEFAULT NULL, uploader int DEFAULT NULL, keywords varchar(500) DEFAULT NULL, rawtext text, lastmodified timestamp default CURRENT_TIMESTAMP ); So to achieve this in Firebird, I am using: CREATE TABLE publications ( id int NOT NULL PRIMARY KEY, filename varchar(500) NOT NULL UNIQUE, title varchar(500) DEFAULT NULL, authors varchar

“connection rejected by remote interface” connecting to Firebird 3 with PDO

♀尐吖头ヾ 提交于 2019-12-04 10:40:37
问题 Try code below, but cause exception - SQLSTATE[HY000] [335544421] connection rejected by remote interface : try { $dbh = new PDO("firebird:dbname=localhost/3050:empty", "SYSDBA", "masterkey"); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sth = $dbh->query('SELECT idmspos, idmsqnt, cdmsval from svc$dms'); $sth->setFetchMode(PDO::FETCH_ASSOC); while($row = $sth->fetch()) { echo $row['idmspos']." ".$row['idmsqnt']." ".$row['cdmsval']."<br>"; } $dbh = null; } catch(PDOException

Pivot rows into columns Firebird 2.5

若如初见. 提交于 2019-12-04 07:36:37
The sequence: table1 ===== id - Description ---------------- |1 |Proj-x |2 |Settlers |3 |Bank |4 |Newiest table2 ===== id table1Id value alternate-value --------------------------------- |1| 1 |12 |null |1| 4 |6 | null |1| null |22 |Desktop |2| 2 |7 |null |2| 3 |11 |null |2| null |2 |Camby Jere |3| 1 |8 |null |3| 4 |6 |null |3| null |7 |Camby Jere The select instruction must return |table1.id|Proj-x|Settlers|Bank |Newiest|Desktop|Camby Jere ---------------------------------------------------------- |1 |12 |null |null |null |null |null |1 |null |null |6 |null |null |null |1 |null |null |null

Firebird 3 sysdba password stunning issue

亡梦爱人 提交于 2019-12-04 07:27:50
I migrated from firebird 2.5.x to 3.0 i have changed firebird.conf : WireCrypt = Enabled AuthServer = Legacy_Auth, Srp, Win_Sspi after that here you are what happened: I can connect from Netbeans IDE using SYSDBA masterkey. I can connect from FlameRobin (database admin. tool) using SYSDBA with other password. I can not connect from Wild-Fly server using SYSDBA with that other password. I am really wondering.!! I assume you are using Jaybird 2.2.x (or earlier) when connecting from Netbeans and Wildfly. With Firebird 3 a new authentication model was introduced called SRP (Secure Remote Password)

is there any way to pivot rows to columns dynamically without a specific no of columns in firebird

青春壹個敷衍的年華 提交于 2019-12-04 07:08:19
问题 I need a way to display my data from rows to columns dynamically using sql. My row no. starts from 0 to N and I want to convert it to columns. I cannot use static column to match my requirement because the maximum no of rows changes every time depending on the policy required by the company. I have done researching but firebird has no pivot/transpose/cross-tab implementation (i might be wrong). Here are my tables here is my client tables here is my payable table i need to display like this

How can I create database tables using structures

廉价感情. 提交于 2019-12-04 06:55:23
问题 I am trying to create and store databases using c interface. I have a structure table that contains some variables and datatypes. How would I convert them into database tables. The details are mentioned below. In, database.c file, I initialized createTable function and Folder_table structure that contains the constraints and data types and I have a function to connect to the database in firebird. Once I read this structure, I would like to know how can I convert this structure into table and

Update one from two of duplicates in Firebird – more rows

跟風遠走 提交于 2019-12-04 06:26:17
问题 How do I update one from two or more duplicate rows? I want to keep one and update the others with a new value. Simple example tables: from one|two|three ---------- 1|milk|water 1|milk|water to one|two|three ---------- 1|milk|water 1|milk|sugar 回答1: http://www.ibexpert.net/ibe/index.php?n=Doc.TheMysteryOfRDBDBKEY Select *, RDB$DB_KEY from MyExampleTable; then Update MyExampleTable Set Column=Value Where RDB$DB_KEY=xxxxx; Another approach would be using Stored Procedure (or Execute Block) and

Firebird 2.5 VS Interbase 9/XE - which performing faster?

亡梦爱人 提交于 2019-12-04 06:17:51
We are on a situation where we must choose between thoose 2 databases. We are currently on Firebird, but sometime it lag because of it stacking too much transaction history or something and backup-restore shall be applied in order to make things better. In my specific case: Database have mostly tables filled with numeric fields. There is mostly inner joins on the queries. Almost the same rate i am inserting, and selecting. ( but on future i am looking about more severe selecting ) There is 3 main tables which having a few bilions of records ( keep growing each second ). But i would like to see

Firebird JDBC driver connection character encoding

偶尔善良 提交于 2019-12-04 02:14:22
I have a JSF application running on tomcat6 in Fedora 17 using firebird as the database and all the registers coming from the database to the application are coming with a encoding problem. The language is Brazilian portuguese so I need é's and ã's and ç and here all of these special characters come with problems. The é's and ã's from the original source code are ok, only the ones coming directly from the database are causing me the trouble... Any idea what is going on? Heres a image where that weird character should be é The problem happens when it recovers from the DB. Vitor Hugo Using