w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Exception in KendoUI Grid InCell edit required for batch updates with batch set to false
I've resolved this... In the toolbar I had the following command toolBar.Save() which appears to have told the control that it was going to be in a batch edit mode of some kind. By removing this I'm now able to get the behavior I want... Copy and pasting examples is dangerous!

Categories : C#

[ODBC Firebird Driver][Firebird]attempted update during read-only transaction
Since I am using odbc connection, the fault was actually in the odbc connection configuration. You simply need to un-check the read (default write). Now it works like a charm. Hope this helps someone.

Categories : C#

Does pymongo support batch query?
Not as a list of dicts, but you should be able to use a query operator to achieve the same effect: db.foo.find({"_id": {"$in": [1377890, 1377545, 1377966, …]}}) I confess I haven't actually tried this, but it's consistent with the MongoDB API and should work with pymongo as well.

Categories : Python

How to make expressjs support batch request like facebook
If you don't want to make loopback connections, then the simplest solution is to manually call your server with fake requests. You'll have to reimplement IncomingMessage. You should also use Async#map to wait until all requests are processed. Here's the basic idea: // You'll probably have more work to do to reimplement http basic API. function FakeRequest(request) { this.url = '/' + request.relative_url; this.method = request.method; this.headers = request.headers; } function FakeResponse() { Stream.call(this); this.statusCode = null; this.body = ''; } FakeResponse.prototype.write = function (chunk) { this.body += chunk.toString('utf8'); return true; }; util.inherits(FakeResponse, Stream); app.post('/', function (req, res) { var requests = JSON.parse(req.body.ba

Categories : Node Js

Does ormlite support batch create and update, delete
getHelper().getDao().callBatchTasks(new Callable<Void>(){ @Override public Void call() throws Exception {}}) ; in call method, can insert multi object in it, and the speed is more faster than execute out of the method.

Categories : Android

Firebird embedded in .net
The page you link to already answers your question. You should not add the embedded Firebird files as references, just as plain files (and make sure to enable copy to output directory): After we download it, we add 'FirebirdSql.Data.FirebirdClient .dll' as reference in our project. For embedded usage of firebird database we also need to download some dll files and add our project. Go , http://www.firebirdsql.org/en/server-packages/ and download embedded package. Add fbembed.dll icudt30.dll icuin30.dll icuuc30.dll in your project as file and set Copy To Output Directory property as Copy always So those dll files will always be copied to output directory.

Categories : Dotnet

Firebird and different versions of JVM
The short answer is: no you can't. You need to include the right bitness files for Firebird embedded in the root of your application, and as the libraries of the 32 bit and 64 bit versions of Firebird embedded have identical names, it is not possible to include them both. UPDATE To my shame (as a developer of Jaybird ;), I just found out it is actually possible to work with both 32 bit and 64 bit versions of embedded in one folder structure, but this requires that you are able to set the PATH environment variable before running your Java application (eg through a .bat, .cmd or a launcher). If you put the files in two folders, eg 64bit and 32bit, you should be able to use a batch file in the root of your application (I am assuming here that jaybird22.dll and jaybird22_x64.dll are also in

Categories : Java

Java and Firebird Embedded how to set up?
look at the chapter 2 of this tutorial. You don't need to set any environment variable. just need firebird driver, defualt user name which is (sysdba) and password (masterkey). You can use flamerobin for the ease use of firebird.

Categories : Java

MAC homebrew php pdo firebird driver
Pdo Firebird from pecl is deprecated , i will updated it soon that i get access to it you need to download the source code for php extract it and then build only the pdo_firebird extension cd ext/pdo_firebird phpize ./configure (you might need to pass the firebird framework dir --with-pdo-firebird=/Library/Frameworks/Firebird.framework ) make sudo make install after that you need to copy the extension in your brew build php extensions folder and add it to php.ini extension=pdo_firebird.so I also recommend firebird 2.5.x is more recent and well supported on recent macosx versions

Categories : PHP

Configure IReport and Firebird
I am assuming that you actually have Firebird installed and your Firebird is running as a service. The user account running the Firebird service does not have access to your user profile and therefor is unable to open a database file in C:UserswaqasDesktopMOBILESTORE.fdb. Put the file in a location that is accessible to all users (or specifically to the user linked to the Firebird service), say C:Databases. That said, I would actually expect this scenario to result in an error almost immediately, so it might be a different problem. EDIT You indicate in the comments, that you receive a java.lang.ClassNotFoundException: org.firebirdsql.jdbc.FBDriver. This means that you did not add the Jaybird JDBC driver to the classpath of iReport. You can download the Jaybird (Firebird JDBC) driver fr

Categories : Java

SQL Error = -804 (C# with firebird database)
I bet one of your TextBox.Text values has a comma in it... Otherwise: Did you check to see if you are specifying the right amount of columns? Basically, the SQL engine is complaining that you gave it a list of parameters and it is trying to fill those into the table Invoice_Name, except, it has too many values for the count of columns in that table. Try printing SQLCommandText to the output window (Debug.WriteLine(SQLCommandText)) and see if that is what you expect it to be... You should also not be doing it this way... check this post here: Inserting into DB with parameters safe from SQL injection?

Categories : C#

Configure phpgrid with firebird
try this: I would build and test a ODBC connection for the firebird database (for windows have a look at this site to get an idea: http://web.synametrics.com/firebird.htm). the conf.php file would be something like this: define('PHPGRID_DB_HOSTNAME','hostname'); // hostname = your odbc connection name define('PHPGRID_DB_USERNAME', 'username'); // database user name define('PHPGRID_DB_PASSWORD', 'password'); // database password define('PHPGRID_DB_NAME', 'sampledb'); // database name define('PHPGRID_DB_TYPE', 'odbc'); // database type = odbc for "generic odbc" or try ibase define('PHPGRID_DB_CHARSET','utf8'); // OPTIONAL. Leave blank to use the default charset

Categories : PHP

Skip a loop with Firebird 2.5
If you want to skip an iteration through a loop without CONTINUE, then just use the inverse of the continue-condition for the rest of the block: While (v_counter <= :v_total) do begin If (NOT <condition>) then BEGIN ... END end

Categories : SQL

Powershell connect to firebird
Yes, powershell allows you to create .Net classes and call .Net methods. See here. So with little trouble you can convert your C# code to powershell.

Categories : Powershell

firebird - self join on one table
It could be done with a single select but algorithmic EXECUTE BLOCK would do much faster: EXECUTE BLOCK RETURNS (ACTION_1 INTEGER, ACTION_2 INTEGER, DURATION INTEGER) AS DECLARE VARIABLE act INTEGER; DECLARE VARIABLE act_id INTEGER; DECLARE VARIABLE d TIMESTAMP = NULL; DECLARE VARIABLE d1 TIMESTAMP = NULL; BEGIN FOR SELECT action, data, id_ppstartstoppoz FROM startstop ORDER BY data ASC INTO :act, :d, :act_id DO BEGIN IF (:act = 0) THEN BEGIN d1 = :d; action_1 = :act_id; END ELSE BEGIN IF (NOT :d1 IS NULL) THEN BEGIN action_2 = :act_id; duration = DATEDIFF(SECOND, :d1, :d); SUSPEND; d1 = NULL; END END END END

Categories : SQL

why can't I connect python to firebird in ubuntu 12.04?
This is untested, but my suspicion is: The error says you cannot connect to 'localhost', which is a network name for the computer you are using. However, you ask Firebird to connect to '/tmp/test.fbd', which is a file system location. Basically, firebird thinks that the you want to connect to the file '/tmp/test.fbd' as if it were a server. Try: con = fdb.connect(host="localhost", database="/tmp/test.fdb", user="fernando", password="root") or con = fdb.connect(dsn="localhost:/tmp/test.fdb", user="fernando", password="root") Assuming of course, that /tmp/fest.fbd is actually on your localhost.

Categories : Python

How to check in Firebird if a datarow can be deleted?
You could try to use the autonomous transactions introduced in Firebird 2.5 to do the check, and simply rollback afterwards. However this will probably introduce a deadlock problem because the row will be 'modified' by a different transaction than the parent transaction. Ask yourself: why bother. Just try to delete and give the user a message if deletion wasn't possible.

Categories : SQL

Error creating trigger in Firebird
Each command in isql must end with terminator symbol - by default thats a ; but since that is also used inside trigger's body as statement terminator you need to change the terminator character to something else using the SET TERM command. To change the terminator to ^ your script would be SET TERM ^ ; CREATE TRIGGER test_trig FOR test AFTER INSERT AS BEGIN POST_EVENT 'test_inserted'; END^ SET TERM ; ^

Categories : Database

Embeded Firebird Database and Hibernate
It seems the step I was missing was creating the database file manually: FBManager manager = new FBManager(GDSType.getType("EMBEDDED")); manager.start(); manager.createDatabase(myDbFile, username, password); manager.stop();

Categories : Java

Locking tables firebird, delphi
Firebird is versioning engine and locking there is innatural thing. The engine, the libraries - they all were optimized to avoid locking. I suggest you take few steps back and looking at the picture in a large scale. You better formulate your task in term of applications behavior and then think how to modify their behavior towards the database to get what you need. And pleease! give applications some name. It is very hard to think and plan in terms "this app" and "other app" - yuyou just inevitably start mixing them. In Firebird you can lock the single row so to lock the table you should make a table consisting of the single row), but even this behavior would be problematic and can only be checked by other application trying to change the same record and commit the change. OldSchool var

Categories : Delphi

SQL Firebird implementation in java/ IBSQL
The error suggests there is an ON in an unexpected place in your query, and as the query itself looks fine, my guess is the problem is with the way you construct the query in your Java application. There might be some whitespace missing in your query. My guess is that you have something like query = "SELECT * " + "FROM table1" + "JOIN table2 ON " //..... The missing whitespace will make the SQL: SELECT * FROM table1JOIN table2 ON .... For the parser, this is perfectly valid until it encounters the ON token, which triggers the error. Eg the parser identifies it is a SELECT with * (all) columns from table1JOIN with alias table2. During parsing the server doesn't check if the table actually exists, so it doesn't trip over the fact that table1JOIN doesn't exist. That is

Categories : Java

Connect firebird database with codeigniter
I found the problem. My lampp wasn't able to use the interbase.so, which is necessary to run the firebird ( ibase_connect function ), so I instaled the apache2. Since I can get the "interbase.so", now I can connect just fine. Btw, I'm running on Ubuntu. Well, this is It. ^^

Categories : Database

Firebird 1.5 : Compare Blob using Java
If you look at Firebird 1.5 error codes, the error code you have been given is a badblk (Bad block) meaning that your byte[] is likely to be the wrong size/form and cannot be read correctly as a ByteArrayInputStream but that is dependent on getBLOB_Content() Also shouldn't the parameter index for your query be 1, not 0?

Categories : Java

Using view firebird with filter by role
Use the CURRENT_ROLE context variable: CREATE OR ALTER VIEW HR_PROJECTS_VIEW( ... where P.ROLE = CURRENT_ROLE;

Categories : Delphi

Firebird: How to order a list aggregate?
As the documentation of LIST() states: The ordering of the list values is undefined. That said, if you use a subquery or common table expression (CTE) that first orders by the GROUP BY-columns and this column then it will work, however this does mean that you are depending on an implementation artefact which might change with point releases or new versions. There is an improvement ticket (CORE-2332) in the Firebird tracker for this, but it hasn't been planned for a version. This ticket also contains an example of the workaround: WITH EDU_EPT AS ( SELECT EEPT2.TARGET_SWE FROM EDUCATION_EVENT_PR_TRGT EEPT2 WHERE EEPT2.EDUCATION_EVENT_ID = :EDU_EVENT_ID ORDER BY EEPT2.ORDINAL, EEPT2.ID ) SELECT LIST('• ' || EEPT.TARGET_SWE, ASCII_CHAR(13) || ASCII_CHAR(10)) || '.' FROM EDU_E

Categories : SQL

jQuery.support.ajax returns true even if XMLHTTP support is disabled
According to this Microsoft page, the IE8 setting only disables the W3C standard XMLHttpRequest object. It leaves the ActiveX Microsoft.XMLHTTP control enabled. There is a separate setting to disable (all) ActiveX controls. The jQuery support.ajax test works for both methods, so disabling the former but leaving the latter enabled will return true.

Categories : Javascript

support lib android.support.v7.widget.GridLayout causes InflateException / ClassNotFoundException with app widgets
When making widgets, you are constrained to the Views that implement the RemoteViews mechanism. The way that mechanism works is that the remote, "host" process is the one doing the actual inflating. Therefore, if that remote process (the launcher that hosts the widget) does not have the GridLayout class in its classpath, there is absolutely no way you can do this short of drawing the View in your own process and setting it as a Bitmap on an ImageView. I wouldn't do that, though. In general, when making widgets, constrain yourself to the Views that come with the framework.

Categories : Android

Grouping matching names with totals Firebird 2.5
If you use GROUP BY you either need to include a column in the GROUP BY, or apply an aggregate function on the column. In your example you need to leave out POSPAY.TXNO, as that is transaction specific (or you could use the aggregate function LIST), and you need to apply the aggregate function SUM to AMOUNT to get the total: SELECT DEBTORS.COMPANY, SUM(POSPAY.AMOUNT) FROM POSPAY INNER JOIN DEBTORS ON (POSPAY.ACCTNUMBER = DEBTORS.ACCOUNT) WHERE PAYMNTTYPID = '7' and weekly = :weekly and txdate >= :fromdate and txdate <= :todate Group by DEBTORS.COMPANY

Categories : SQL

firebird, insert records using query window
The SQL standard defines double quotes to denote identifiers (table names, column names, constraint names, ...). So "A" identifies a column named A and not a single character. String literals have to be enclosed in single quotes in SQL. So you need to use 'A' to denote a string (character) literal. Putting this together you need: INSERT INTO AllowedFields(Name, FieldRecord) VALUES ('A', 0.00); INSERT INTO AllowedFields(Name, FieldRecord) VALUES ('E', 13.00); You should also be aware that the standard requires quoted names to be case-sensitive, so "A" is a different column than "a"). And Firebird follows the standard.

Categories : Database

Any way to use a Firebird embedded database on a native (NDK) Android app?
Today i found this link: Building Firebird Client for Android Maybe it helps. Andreas

Categories : Android

how to display and set user rights in firebird database
The gsec utility allows one to manage users which are allowed to connect to specific Firebird server instance. Ie it allows to manage the user list Firebird server would recognize (see gsec manual). But it doesn't allow you to manage what each user is allowed to do in some particular database. For managing user rights in particular database you should use roles and GRANT and REVOKE statements. I suggest you use some GUI tool to manage user rights, ie Flamerobin.

Categories : SQL

Firebird: Convert date to relevant format?
I don't use Firebird, but from the docs, you might be able to cast a timestamp to a date (by the way, I'm surprised that you can use coalesce with different types, but... that's another problem). So either COALESCE(CAST(date1 as date), date2) or Firebird shortcut COALESCE(date date1, date2) if you got errors, you may try to see what's happening when doing select CAST(date1 as date) from ...

Categories : SQL

firebird embedded multiple inserts using .net provider
You don't need the set term statements, these are isql specific thing. So try String sql = @"EXECUTE BLOCK AS BEGIN INSERT INTO Customers(ID, Name, SiteID) VALUES(1,'delta',2); INSERT INTO Customers(ID, Name, SiteID) VALUES(2,'phoenix',2); END";

Categories : C#

IBtransaction and Firebird for a multi-user program
Use GENERATORS. With GENERATORS you get always unique numbers. It doesn't matter how many transactions are active, they live outside the transaction control. See Firebird Generator Guide

Categories : Delphi

Is it possible to set Firebird WAIT timeout for transaction when using NHibernate
From this very old link you can do any of these: use the predefined isolation levels by calling public FbTransaction BeginTransaction(IsolationLevel) tune the transaction options more precisely by using this BeginTransaction overload: public FbTransaction BeginTransaction(FbTransactionOptions) So probably you should use second option to set the no_wait parameter. But you may want an updated version of the documentation, or you could have problem like this guy. Maybe look at Jiří Činčura's blog.

Categories : Dotnet

Move ResultSet cursor back in Firebird
When you create a Statement (or PreparedStatement), you need to specify the result set type, if you don't the driver will use the default (TYPE_FORWARD_ONLY). So to get a scrollable ResultSet, you need to use PreparedStatement ps = connection.prepareStatement(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); See the javadoc of Connection.prepareStatement(sql, resultSetType, resultSetConcurrency). Also be aware that your current code is leaking resources. You are creating a PreparedStatement in a method and never closing it. You might want to restructure your code so you can close both the statement and the result set in the same place. Closing the statement in its current place won't work, as that would also close the ResultSet before you can use it.

Categories : Java

row count of all the tables in SQL manager for interbase and firebird
Try this one (with fix) - SELECT o.[object_id] , [object_name] = s.name + '.' + o.name , c.col_count , r.row_count , data_size = CAST(r.pages * 8 AS VARCHAR(10)) + ' KB' FROM sys.objects o WITH (NOWAIT) JOIN sys.schemas s WITH (NOWAIT) ON o.[schema_id] = s.[schema_id] JOIN ( SELECT c.[object_id], col_count = COUNT(1) FROM sys.columns c WITH (NOWAIT) GROUP BY c.[object_id] ) c ON c.[object_id] = o.[object_id] JOIN ( SELECT p.[object_id] , row_count = SUM(p.[rows]) , pages = SUM( CASE WHEN a.[type] != 1 AND p.index_id < 2 THEN a.used_pages WHEN p.index_id < 2 THEN a.data_pages ELSE 0 END ) FROM sys.partitions p JOIN sys.allocation_units

Categories : SQL

How to hide query statement while running in Firebird?
There is no way to do this. However MON$STATEMENT only shows your own queries, unless you are SYSDBA, the owner of the database, or a user with the RDB$ADMIN role (then you can see all queries). Other then MON$STATEMENT, there is also the trace facility which allows people with sufficient access to see queries (either on the server or through the service api). People with insufficient access to the database can still see queries if they can see the network traffic between the application and the database server. The only way is to not give any form of access to the database server to people who should not be able to see the queries. This can be done by hosting the application as a webapplication, or putting a webservice or other form of middleware between the database and the real applica

Categories : SQL

Firebird CTE result dataset with insert statement
You can insert the result of an select statement by adding INSERT INTO <table> (<column>[, <column>]*) before the select statement (including the WITH). So If you have a query: WITH a AS ( SELECT 4 AS ID, 'Item 4' AS NAME FROM RDB$DATABASE ) SELECT ID, NAME FROM a And you want to insert into a table ITEMS with columns ID and NAME: INSERT INTO ITEMS (ID, NAME) WITH a AS ( SELECT 4 AS ID, 'Item 4' AS NAME FROM RDB$DATABASE ) SELECT ID, NAME FROM a This works on Firebird 2.5, but I assume it also works in Firebird 2.1. Based on your edit: Your syntax is simply wrong: insert into ntm (num,comb,0,0,0,0,0,0,0,0,0,0,0,0) is invalid: you don't have a columns num and comb in table ntm, and specifying 0 as a column name is illegal. It seems you are confusing th

Categories : SQL

PHP application connect with external firebird database
I do not use PDO #apt-get install php5-interbase You do not need to install firebird on local machine PHP sample code $dbh = ibase_pconnect("remote_server_ip:db_file", "user_name", "user_password") or die('die message'); $q = ibase_query($dbh, "select * from some_table"); while ($r = ibase_fetch_object($q)) { $some_value = $r->SOME_FIELD; echo $some_value; }

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.