嵌入式firebird+VS2015实例四

示例gb2312Test

创建表时使用character set gb2312处理中文

建立VS2015C#项目:gb2312Test

ChineseFileNameTest模板

修改创建表CommandText语句,如下:

createTable.CommandText =

"create table TestTBL (id int, namevarchar(20) character set gb2312)";

测试

1、直接运行,成功:

2、删除intl目录:

 

运行异常:

3、恢复intl目录,插入中文字段名

修改创建表CommandText语句,如下:

createTable.CommandText =

"create table TestTBL (id int, \"姓名\" varchar(20) character setgb2312)";

运行异常:


小结

创建表时使用character set gb2312可以处理中文路径、中文记录,但不能处理中文字段名,不能缺少INTL目录。

猜你喜欢

转载自blog.csdn.net/u013727899/article/details/80106883