firebird

JDBC操作firebird数据库出现乱码的应急解决方案

匿名 (未验证) 提交于 2019-12-02 23:43:01
2019独角兽企业重金招聘Python工程师标准>>> 原先有个系统是用delphi进行开发的,使用了firebird数据库,建库的时候没有选择编码,当然,在delphi中,读写中文都是正常的。现在需要给原系统加个从别的数据库同步数据的功能,因为是远程同步,同步的数据量也不大,频率一天四次,就打算用嵌入式jetty,写个简单的handler实现这个功能,客户端采用httpclient进行数据上传。客户端与服务器之间用https双向认证的方式。 稀里哗啦一顿乱写,终于把基本代码写完了,一运行,晕了,同步过来的数据,写到firebird中,居然都是乱码。按firebird的jdbc驱动jaybird手册中说的,给jdbc连接串添加?lc_ctype=GBK也没有用,乱码依旧。 经过反复的测试,证明要写正确的字符到数据库中,别的方法我不知道,但下面的应急方法,还是有点用处,主要思路就是用preparestatement,字段内容以参数的方式写入,凡是字符串字段,不用setString方法,而是采用setBytes的方式,参数用GBK转码。 上代码片段: 转载于:https://my.oschina.net/kivensoft/blog/549365 文章来源: https://blog.csdn.net/weixin_34255793/article/details/92058671

Column aliasing in SELECT statements doesn't work with SQuirrel SQL + Firebird

笑着哭i 提交于 2019-12-02 22:27:44
I tried add an column alias in SELECT statement using SQuirrel SQL 3.4 + Firebird 1.5 + Driver JDBC Jaybird 2.2.[0|1] (JVM 1.7.0_03), but doesn't work. The column aliased appears with the original name of column. In another tool (DBExpert) the same statement works fine. Statement : SELECT column1 AS alias1, column2 FROM table; Resultant columns name in SquirrelSQL : column1 - column2 Resultant columns name in DBExpert : alias1 - column2 Tried add ' and " around alias name, but also not work. Someone have an idea? Edit: I updated the JDBC Jaybird driver to 2.2.1 version (released Sept/30) and

Full Text Search with Firebird and Delphi

大兔子大兔子 提交于 2019-12-02 21:16:28
I'm looking into implementing full text search on our Firebird database. Our requirements are: Every field in several tables should be indexed. When a result is found we should be able to find out the originating table. The index can be stored in the database or in the file system. The results of the search (BigInt primary keys) must be used to join with the original records in the database to display the records in a table. Can anybody recommend a decent way to achieve what we need? I've looked at somehow integrating DotLucence into Delphi, but can't really find very much information on how

what's the best Firebird IDE? [closed]

扶醉桌前 提交于 2019-12-02 18:19:56
Simple question. I'm considering Firebird and SQLite for an upcoming project. SQLite has SQLite Administrator, which is pretty good but gets +1M because it has autocomplete. But Firebird supports FKs, so I'm more comfortable with it. I'm leaning toward Firebird right now. What is your favorite Firebird IDE and why? Edit: Personally, I'll be gravitating toward the free ones because I'm not making much on this project. But I'll leave the question as is. I like IBExpert for Firebird (or Interbase). They have a free personal edition. Test all this ! IBEasy http://www.marc-grange.net/telecharger

Using Delphi data-aware components - pros and cons [closed]

南笙酒味 提交于 2019-12-02 17:38:46
I want to know your opinion about using data-aware components in projects. Which are the 'strength' and 'weak' points of developing applications(win32 and web), by using Delphi and data-aware components(from Delphi's standard suite or third-party)? Using FireBird I've worked a lot with IBObjects, which are a mature suite of components and worked very well. But there are also a lot of other RDBMS (MySQL, MSSQL, DB2, Oracle, SQLite, Nexus, Paradox, Interbase, FireBird etc). If you have developed big projects, on which you've used a lot data-aware components please answer with the database type

Firebird in IBExpert throws errors while accessing some stored procedure

和自甴很熟 提交于 2019-12-02 16:31:49
问题 I am completely new to Firebird; I have been given a Firebird 2.5 database (by our client) - XYZ.fdb I have registered this XYZ.fdb database in IB Expert. I am able to run successfully some views and stored procedures. However for some other views or stored procedure, I get the following error: can't format message 13:896 - message file C:Windows\firebird.msg not found; invalid request BLR at offset 623; function LTRIM is not defined; module name or entrypoint could not be found; Error while

Connecting to Firebird database from Windows local network

独自空忆成欢 提交于 2019-12-02 15:01:16
问题 I have been writing a small Python app for several weeks. The application reads data from a Firebird database and it copies it to another DB. I'm using FDB with Firebird embedded. This is my connection code. def createConnectionTo(path): try: connection = fdb.connect( database=path, user='SYSDBA', password='masterkey', charset='WIN1252' ) print("Connessione al database riuscita!\n") return connection except fdb.fbcore.DatabaseError as details: errorMsg = "ERRORE: impossibile connettersi al

How, and where to install a database driver into an IDE? Part II

别说谁变了你拦得住时间么 提交于 2019-12-02 14:03:26
问题 The background to this query was this question. I have installed this driver for Firebird and placed it within the path (system32) used by the IDE. The XE Data Explorer recognises the driver, and it is possible to create a connection using the Data Explorer. Trying to view tables or any other database element through this connection results in the error described in this question. As far as I can see @Alejandro Jourdan has not obtained a solution to this problem, and I can find no solution on

Insert Firebird Database C#

房东的猫 提交于 2019-12-02 13:14:53
问题 FbCommand fbCmm = new FbCommand("INSERT INTO PRODUTO (CODIGO,EAN,DESCRICAO,VAL_PRODUTO,VAL_CUSTO,CAT_PRECO)" + "Values (@txt_codigo.Text, @txt_ean, @txt_descricao, @txt_valPro, @txt_valCus, @txt_catPre)", ConexaoFirebird.Conexao); What's wrong with that sentence? I did a open connection in other class - ConexaoFirebird.Conexao(); 回答1: You're executing a parameterized query without providing values for those parameters. See the documentation: FbCommand cmd = new FbCommand("insert into t1(id,

Problem connecting to Firebird 3 embedded with C# in .NET

两盒软妹~` 提交于 2019-12-02 12:38:30
问题 I am trying to connect to Firebird 3 embedded database from a .NET project. I have copied all the files of Firebird to the executing directory of the application. I have used the following connection string builder: var builder = new FbConnectionStringBuilder() { UserID = v1, Password = v2, Database = v3, ServerType = FbServerType.Embedded, Charset = "UTF8", ClientLibrary = "fbclient.dll" }; However I get the following connection error FirebirdSql.Data.FirebirdClient.FbException (0x80004005):