dbexpress

How can I get the name of the database a DBExpress TSqlConnection is actually connected to?

徘徊边缘 提交于 2019-12-11 18:38:00
问题 I'm testing a quite old Delphi 6 application and would like to display the database name the TSqlConnection is actually connected to, so I can see quickly if I'm connected to the test or production database. In sqlconnections.ini, the app has a connection named 'Vienna' to a Firebird database defined like this: Database=192.168.1.15:ProductionDB (it's an alias) and I've replaced that for testing purposes with Database=192.168.1.15:TestDB. But I've seen that just accessing the TSqlConnection's

Delphi DBX and MySQL connection nightmare : DBX Error: Driver could not be properly initialized

泪湿孤枕 提交于 2019-12-11 07:59:31
问题 Ok, in the past i had a huge headache to make DBX work with MySQL. In such episode i was trying to make it work with Delphi 2007 and i lost days looking for the right libmysql.dll and dbxmys.dll combination, trying dozens until i found one couple that worked. Now i have the same issue this time in Delphi XE. The same libraries used for D2007 does not work with XE, returning the very known infamous error : DBX Error: Driver could not be properly initialized. Client library may be missing, not

Setup an ODBC connection to a MS Access DB under Data Explorer in XE2 Enterprise that does not use a DSN

跟風遠走 提交于 2019-12-11 06:30:26
问题 Using the Enterprise version of XE2, which includes native dbExpress ODBC support, I have successfully created a "Connection" where the Database Name is the name of the System DSN, and the Password is the MS Access database password. I can click Test Connection on the Modify Connection page, and the Database Explorer reports Test connection succeeded. Dragging and dropping the connection from the Data Explorer creates a TSQLConnection with the Driver property set to ODBC and the Params

How to return Oracle Cursor from stored proc as Client Dataset using Delphi and DBExpress

天涯浪子 提交于 2019-12-11 04:35:17
问题 1st off I am Still a little green to Delphi so this might be a "mundane detail" that's being over looked. [sorry in advance] I have a need to create a TSQLDataset or TClientDataSet from an Oracle 11g cursor contained in a package. I am using Delphi XE2 and DBExpress to connect to the DB and DataSnap to send the data back to the client. I'm having problems executing the stored procedure from the Delphi code. Package Head : create or replace PACKAGE KP_DATASNAPTEST AS procedure GetFaxData(abbr

Which dbExpress ServerCharSet do I need for utf8 data in MySQL 5?

天大地大妈咪最大 提交于 2019-12-08 08:15:32
问题 We tried ServerCharSet=utf8 and ServerCharSet=UTF8 , based on information found in newsgroups - but still, special characters / Umlauts do not appear correctly in the client data. We use Delphi 2009 and the built-in dbExpress driver. Field data is retrieved using AsWideString. 回答1: you have to set up a client charset. Simple " SET NAMES utf8 " query, executed right after connect, will do the trick 来源: https://stackoverflow.com/questions/3598593/which-dbexpress-servercharset-do-i-need-for-utf8

SQL Server 2005 and 'General network error'

时光毁灭记忆、已成空白 提交于 2019-12-08 06:11:22
问题 I know there is a lot of information in the Internet about solving this problem, but it didn't help me. My Delphi application uses dbExpress controls to access the database and execute SQL queries. Once every couple of days, however, it stops working because the database connection fails. This happens on several different computers with different versions of Windows. MSSQL Server 2005 (version 9.0.4035) is installed on each of them. The above mentioned application executes queries every

delphi dxExpress MySQL: invalid LAST_INSERT_ID value

不打扰是莪最后的温柔 提交于 2019-12-08 03:04:10
问题 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

How to mark all TClientDataSet records as Inserted?

寵の児 提交于 2019-12-08 01:46:57
问题 I have a complex transaction that saves data from multiple TClientDataSets in database. One of those ClientDataSets always append data to underlaying table, eg. generate INSERT statements, regardless of where existing records came from. I'm forcing inserts right now with: // Create temp table, assign all target data, // Empty target table, append data from temp Tmp := TClientDataSet.Create; Tmp.Data := Table.Data; Table.MergeChangeLog; Table.EmptyDataSet; Tmp.First; // Append all records

How to pass a parameter to a query using dbExpress in Delphi

南笙酒味 提交于 2019-12-07 07:21:01
问题 I want to use a dbExpress TSQLQuery component. But i do not know how to write the SQL to add a parameter. I will give an example maybe it will be more clear what my problem is. In a TADOQuery the following works: SELECT* FROM sometable WHERE sometable.id = :value; Now in the above example you pass the parameter to the query using the colon (:) before the parameter name. But when I try and do that with the TSQLQuery, I get the following error: dbExpress driver does not support the TDBXTypes

Which dbExpress ServerCharSet do I need for utf8 data in MySQL 5?

喜你入骨 提交于 2019-12-06 16:02:46
We tried ServerCharSet=utf8 and ServerCharSet=UTF8 , based on information found in newsgroups - but still, special characters / Umlauts do not appear correctly in the client data. We use Delphi 2009 and the built-in dbExpress driver. Field data is retrieved using AsWideString. you have to set up a client charset. Simple " SET NAMES utf8 " query, executed right after connect, will do the trick 来源: https://stackoverflow.com/questions/3598593/which-dbexpress-servercharset-do-i-need-for-utf8-data-in-mysql-5