firebird

Field name from ID on table 1 but name on other table

让人想犯罪 __ 提交于 2019-12-10 21:00:06
问题 This is a Firebird database. First Table Contacts Company_ID - job_title Second Table Client_id - Co_name In contacts, I want to the job_title field to contain the co_name. client_id and company_id are the same. Co_name correspond to company_id as well as client_id. this: UPDATE Contacts SET Contacts.Job_title = Clients.co_name where company_id in ( select client_id from clients JOIN Contacts c ON Client_id=company_id where record_status='A') gives me an error as cannot find (clients.co_name)

How to use events on an Embedded Firebird database connection?

被刻印的时光 ゝ 提交于 2019-12-10 18:04:41
问题 If I connect to an embedded Firebird database, and create a remote event, I get System.NotSupportedException: Specified method is not supported.. on the constructor. _fbRemoteEvent = new FbRemoteEvent(_fbConnection); //_fbConnection is valid and Opened Looking at source code from call stack, it leads to FesDatabase.cs with RemoteEvent IDatabase.CreateEvent() { throw new NotSupportedException(); } I use the embedded version for automated tests purpose ... Is there something I can do to get

Firebird exception: Table unknown [duplicate]

╄→гoц情女王★ 提交于 2019-12-10 18:02:59
问题 This question already has an answer here : firebird isql: “there is no table XXXX in this database” (1 answer) Closed 3 years ago . I could establish the connection to a Firebird database with the following connection string: ConnectionString = "User ID=SYSDBA;Password=masterkey;Database=localhost:C:\\MyDb\\mydb.FDB;DataSource=localhost;Charset=NONE;"; But when the C# code tries to execute the query the following error comes: Dynamic SQL Error SQL Error Code = -204 Table unknown The code that

Firebird: Using global variable

大城市里の小女人 提交于 2019-12-10 17:48:48
问题 I would like to assign a value to a variable which is used in an sql code in firebird. The MySQL-Code would be: SET @x = 1; SELECT @x; What is the correspondent Firebird-Code? Thanks for help. 回答1: To define a user-defined session-specific variable in Firebird you can use rdb$set_context. The correspondent Firbird-code for your MySql-example would be: select rdb$set_context('USER_SESSION', 'x', 1) from rdb$database select rdb$get_context('USER_SESSION', 'x') from rdb$database Notes: 1.) Be

New embedded Firebird, code first, EF6 project results in SerializationException

烈酒焚心 提交于 2019-12-10 17:39:24
问题 I'm trying to set up Firebird with EF6 as an embedded server for a simple app I'm writing but haven't been able to get it to work. I have a CLI project which is the app and the DAL project which is the DB. I added the NuGet packages to both and created a DbContext with a simple entity, and created an initial migration successfully, but when trying to run update-database to execute the migration I received this error in the Package Manager Console: System.Runtime.Serialization

Firebird or NexusDB

☆樱花仙子☆ 提交于 2019-12-10 15:54:54
问题 I know that there are many Delphi database related questions available, but I'm considering only these two databases. I will need to query around 100.000 records. From your experience which one is faster: as embedded as C/S Thanks. 回答1: I Haven't used Nexus tbh, but I use Firebird regulary (Client/Server) and I am absolutely loving it. It's small, fast, tries-to-be SQL92 compliant, and the management tools are f-a-n-t-a-s-t-i-c (see IBExpert, they have free edition aswell) The embedded

How to access databases from within Delphi XE Professional IDE?

好久不见. 提交于 2019-12-10 15:16:10
问题 I cannot access ANY database by ANY means from within Delphi XE Professional. What I mean by accessing the data base is: having the live database appear via components in the Object Inspector, when the connected property is set to true using the Data Explorer to create and explore database connections EDIT: SORTED !! The core problem is that communication into the database, including specifically the communication generated by the IDE and any code built using the drivers was problematic.

How to execute a block statement in C# for Firebird

情到浓时终转凉″ 提交于 2019-12-10 14:55:15
问题 I am trying to delete all tables in a database in Firebird using the following command: string dropAllForeignKeysSql = "EXECUTE BLOCK RETURNS (stmt VARCHAR(1000)) AS "+ "BEGIN "+ "FOR "+ "select 'alter table \"'||r.rdb$relation_name ||'\" drop constraint '||r.rdb$constraint_name||';' "+ "from rdb$relation_constraints r "+ "where (r.rdb$constraint_type='FOREIGN KEY') "+ "into :stmt "+ " DO begin execute statement :stmt; end "+ "END "+ ";"; using (var connection = sessionFactory.OpenSession()

Firebird multiple statements

匆匆过客 提交于 2019-12-10 14:53:20
问题 is there any way to execute multiple statements (none of which will have to return anything) on Firebird? Like importing a SQL file and executing it. I've been looking for a while and couldn't find anything for this. 回答1: Shouldn't the normal query-delimiter work? Like: Update stuff; Delete stuff; Update stuff; 回答2: Execute statement is exactly for that purpose. Works in IBExpert too, a simple example : execute block as begin Update stuff; Delete stuff; Update stuff; end Comprehensive guide,

Updating generator value issue

99封情书 提交于 2019-12-10 14:51:53
问题 I'm currently working on modifying a Firebird v. 1.5 database. The database structure will be modified running queries from a delphi application using interbase components, the problem I'm facing is that I need to run a lot of queries, some of which include creating generators and updating the generator value, the problem is that I need to achieve this in as few queries as possible, but it seems(at least to me) that this is not really possible, what I'm trying to do is the following: /* this