dbexpress

Is it possible to tweak TStringField to work like TWideStringField in Delphi?

喜夏-厌秋 提交于 2019-12-06 05:15:02
问题 We want to use Unicode with Delphi 2009 and Interbase, and found that to switch the character encoding from WIN1252 to UNICODE_FSS or UTF8 we first have to replace all instances of TStringField with TWideStringField in all datamodules. For around 60 datamodules, we can not simply do this over one weekend. I can see only two options for a migration strategy: find a workaround which allows to use the existing TStringField fields without triggering the 'expected: TWideStringField' error or

delphi dxExpress MySQL: invalid LAST_INSERT_ID value

喜你入骨 提交于 2019-12-06 04:41:02
I am developing an application in Delphi and want to insert records to Mysql's table. An then I want to know inserted record's identity value. So I write bellow code. On run time , insert is done and record added but returned value for identity is zero!! what is my mistake ?!! -- MySql table create CREATE TABLE Sample_Table ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, mobile_number varchar(20) DEFAULT NULL, message_body text, PRIMARY KEY (id) ); --- Delphi code SQLCon := TSQLConnection.Create(self); with SQLCon do begin Close; DriverName := 'MySQL'; GetDriverFunc := 'getSQLDriverMYSQL';

How to get the millisecond value from a Timestamp field in firebird with Delphi 2007

社会主义新天地 提交于 2019-12-05 10:31:15
I have a Firebird database (running on server version 2.1.3) and am connecting to it with Delphi 2007 using the DBExpress objects (using the Interbase driver) One of my tables in the database looks something like this CREATE TABLE MYTABLE ( MYDATE Timestamp NOT NULL, MYINDEX Integer NOT NULL, ... Snip ... PRIMARY KEY (MYDATE ,MYINDEX) ); I can add to the table OK, and in Flame Robin it shows the timestamp field as having a millisecond value. But when I do a select all ( select * from MYTABLE ) on the table I can not get the millisecond value, as it is always returned as 000. This causes major

Firebird: DBExpress or native components?

萝らか妹 提交于 2019-12-04 21:01:01
问题 I am starting with Firebird and have found components to access a database by Devart. They offer native components (IBDAC) or DBExpress drivers. (I am using Delphi XE2 Pro which doesn't include Firebird drivers) I guess native components are a bit faster, but that's not too important for me. What are the advantages/disadvantages of each approach and why should I choose one over the other? 回答1: IBdac your application is tied to firebird you are familiar with bde or ado performance maximal

Where can I find free open source dbexpress driver for mysql

♀尐吖头ヾ 提交于 2019-12-04 19:17:51
I need a dbx driver for mysql. It should be free. Open source is appreciated. (delphi 7+ and mysql 5+) check this out DbExpress drivers for MySQL V5.0 The Borland-supplied dbExpress drivers for MySQL prior to Delphi 2007 only work up to version V4.0 of MySQL, even though version V5.0 is becoming increasingly popular, and V5.1 is now in beta. The Just Software Solutions dbxOpenMySQL5 drivers provide a drop-in replacement for the vast majority of cases, allowing easy transition to the newer versions of MySQL. with LGPL licence I find this here (In fact it is not really for MySQL but MySQL via

How to execute a SQL script using dbExpress?

孤人 提交于 2019-12-04 16:55:55
I'm migrating an old Delphi application (using ZeosDB) to Delphi XE2. I want to use dbExpress as a ZeosDB replacement for database access to Firebird 2.5 or MS-SQL. There are a lot of sql scripts for creating tables, view and stored procedures I need to run. The Firebird script commands are seperated with ^, MS-SQL script commands with "GO". How can I run these scripts on the database using a dbexpress connection? ZeosDB provides a TZSqlProcessor, but I can't find any equivalent component for dbExpress. I do not use DBExpress but as far as I am aware, you can execute (either by Execute or

How can I get the table description (fields and types) from Firebird with dbExpress

北城以北 提交于 2019-12-03 06:42:31
I have written a tool for displaying database structures using the GetTableNames and GetFieldNames methods of TSQLConnection. How can I get the types of each field name similar to the following list (which is part of the DDL required to build the table)? TABLE: ARTICLES ID INTEGER NOT NULL PRINTED SMALLINT DEFAULT 0 ACADEMIC SMALLINT RELEVANCE SMALLINT SOURCE VARCHAR(64) CHARACTER SET WIN1251 COLLATE WIN1251 NAME VARCHAR(128) CHARACTER SET WIN1251 COLLATE WIN1251 FILENAME VARCHAR(128) CHARACTER SET WIN1251 COLLATE WIN1251 NOTES VARCHAR(2048) CHARACTER SET WIN1251 COLLATE WIN1251 This is

How do I make connection pooling work in DBX?

放肆的年华 提交于 2019-12-02 04:54:14
问题 Well, I managed get the delegate driver to set up properly, but connection pooling is still giving me a lot of trouble. From the descriptions given in the documentation, it appears that connection pooling should work like this: Set up the DBXPool driver delegate on a single, global Connection object Use this Connection object for all calls into the database Each DB call will get automagically routed through the delegate driver into a connection that's unique to its thread, owned by the

How do I make connection pooling work in DBX?

爱⌒轻易说出口 提交于 2019-12-02 00:23:39
Well, I managed get the delegate driver to set up properly, but connection pooling is still giving me a lot of trouble. From the descriptions given in the documentation, it appears that connection pooling should work like this: Set up the DBXPool driver delegate on a single, global Connection object Use this Connection object for all calls into the database Each DB call will get automagically routed through the delegate driver into a connection that's unique to its thread, owned by the connection pool. In practice, I'm finding that everything seems to still be handled by the global Connection

Delphi 2010 and Dbexpress deploy

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 17:43:37
问题 How on Earth to deploy a Delphi 2009 /2010 app that connects to a remote mysql using dbexpress? What files to include? Thanks 回答1: You need dbexpress driver for MySQL (dbxmys.dll), and MySQL client library which is a single DLL (libmySQL.dll). In Delphi 2009, there is a bug (I'm not sure if it is fixed by any update), which makes you deploy dbxdrivers.ini and dbxconnections.ini files with your application too; otherwise you will get a runtime error on the target machine. There are a few