Delphi dbExpress和Interbase:UTF8迁移步骤和风险? [英] Delphi dbExpress and Interbase: UTF8 migration steps and risks?

查看:143
本文介绍了Delphi dbExpress和Interbase:UTF8迁移步骤和风险?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我们的数据库使用Win1252作为唯一的字符编码。我们将不得不在数据库表中支持Unicode,这意味着我们必须对四个数据库进行这种迁移,并在大部分24/7环境中运行大约80个Delphi应用程序。有关Delphi应用程序迁移到UTF-8(或UNICODE_FSS)的数据库的建议?下面列出的一些问题。非常感谢您的答案!




  • 工具有助于迁移现有数据库(大小在250 MB和2 GB之间,没有Blob字段),通过转储数据,使用UNICODE_FSS或UTF-8重新创建数据库,并加载数据?

  • 是否有已知的问题与Delphi 2009,dbExpress和Interbase 7.5相关的Unicode字符集?

  • 您是否建议先将数据库升级到 Interbase 2009 ? (此升级计划但没有高优先级)

  • 我们可以简单地迁移数据库,Delphi会自动处理Unicode字符集,否则将不得不更改所有每个Datamodule中的字符字段类型(dfm和源代码)?

  • 您将推荐哪种策略与< strong>平行移植正常开发和维护现有应用程序?应用程序在内部运行,所以开发和数据库管理在内部完成。






更新:来自InterBase讨论区主题: InterBase中的Unicode数据库 - 真的吗?不是我的一个线程,但它显示在InterBase XE中仍然存在一些问题。


以下是我提交的一些报告:
QC#92867 - 如果View
包含联盟,以及使用
ClientDataSet时,字符串字段为空白
。这被发现是
的一些报告中缺少的数据,
不再工作。



QC#91494 - IB字符列数据
字符字段(例如:Char(1))是
通过存储过程检索
时填充空白。测试失败
- 例如:如果Active =Y。我大量使用存储过程与
,这些不起作用。



QC#91355 - IBSqlMonitor失败。 IBSqlMonitor的
输出有点
乱码,使得该工具无用。 (所以,
甚至我的铲子坏了!)

未报告 -
中的持久字段TClientDataSet对于TWideString失败。


其他相关的QC条目:



QC#94455 SQL Unicode字符类型失败(InterBase XE)

解决方案

问题:空字符串字段上的UPDATE不再找到记录。如果UTF8字符为空,则DataSetProvider会为更新操作生成错误的SELECT。



症状:消息未被其他用户找到或编辑



解决方案:升级到Delphi 2010 Update 4或使用QC中描述的解决方法


Currently, our database uses Win1252 as the only character encoding. We will have to support Unicode in the database tables soon, which means we have to perform this migration for four databases and around 80 Delphi applications which run in-house in a 24/7 environment. Are there recommendations for database migrations to UTF-8 (or UNICODE_FSS) for Delphi applications? Some questions listed below. Many thanks in advance for your answers!

  • are there tools which help with the migration of the existing databases (sizes between 250 MB and 2 GB, no Blob fields), by dumping the data, recreating the database with UNICODE_FSS or UTF-8, and loading the data back?
  • are there known problems with Delphi 2009, dbExpress and Interbase 7.5 related to Unicode character sets?
  • would you recommend to upgrade the databases to Interbase 2009 first? (This upgrade is planned but does not have a high priority)
  • can we simply migrate the database and Delphi will handle the Unicode character sets automatically, or will we have to change all character field types in every Datamodule (dfm and source code) too?
  • which strategy would you recommend to work on the migration in parallel with the normal development and maintenance of the existing application? The application runs in-house so development and database administration is done internally.

Update: From InterBase discussion forum thread: Unicode Databases in InterBase - Really? (it is not a thread by me but it shows that some problems still exist in InterBase XE).

Here are some reports I've submitted: QC#92867 - String fields are blank coming from Views only if the View includes a Union, and when using a ClientDataSet. This was found as missing data on a few of my reports, which no longer work.

QC#91494 - IB Character column data Character fields (eg: Char(1)) are padded with blanks when retrieved through a stored procedure. Tests fail - eg: If Active = "Y". I make heavy use of stored procedures with forms and these do not work.

QC#91355 - IBSqlMonitor fails. The output of IBSqlMonitor is somewhat garbled making this tool useless. (So, even my shovel is broken!)

Unreported - Persistent fields in TClientDataSet fail for TWideString.

Other related QC entries:

QC#94455 SQL Unicode Char Type Failure (InterBase XE)

解决方案

Problem: UPDATE on a empty string field no longer finds a record. If a UTF8 character field is empty, the DataSetProvider generates a wrong SELECT for the update action.

Symptom: Message 'record not found or edited by another user'

Solution: upgrade to Delphi 2010 Update 4 or use the workaround described in QC

这篇关于Delphi dbExpress和Interbase:UTF8迁移步骤和风险?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆