简体   繁体   English

它是对DB2的杂货支持吗?

[英]Is it grocerycrud support for DB2?

i have question about grocercrud, does it really support for DB2? 我对grocercrud有疑问,它真的支持DB2吗?

because i had tried and it failed. 因为我尝试过但失败了。

this is my connection setup (Codeigniter 3): 这是我的连接设置(Codeigniter 3):

$active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
    'dsn'   => '',
    'hostname' => 'Driver={IBM DB2 ODBC DRIVER - DB2COPY1};Database=SAMPLE;hostname=localhost;port=50000;protocol=TCPIP;" . "boby.wayz; 1q2w3e4r5t;',
    'username' => 'boby.wayz',
    'password' => '1q2w3e4r5t',
    'database' => 'SAMPLE',
    'dbdriver' => 'odbc',
    'dbprefix' => '',
    'pconnect' => FALSE,
    'db_debug' => (ENVIRONMENT !== 'production'),
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE
);

and this the error that i've got: 这是我得到的错误:

Error Number: S0002 错误编号:S0002

[IBM][CLI Driver][DB2/NT64] SQL0204N "INFORMATION_SCHEMA.TABLES" is an undefined name. [IBM] [CLI驱动程序] [DB2 / NT64] SQL0204N“ INFORMATION_SCHEMA.TABLES”是未定义的名称。 SQLSTATE=42704 SQLSTATE = 42704

SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' 从information_schema.tables中选择table_name,在其中table_schema ='public'

Filename: C:/xampp/htdocs/personal/dailywork/system/database/DB_driver.php 文件名:C:/xampp/htdocs/personal/dailywork/system/database/DB_driver.php

Line Number: 691 行号:691

The website says in known issues that it only supports MySQL with MySQLi. 该网站在已知问题中说,它仅支持MySQLi和MySQLi。

DB2 provides a MySQL compatibility mode (but this requires that the database be created after MySQL compatibility mode is already enabled). DB2提供了MySQL兼容模式(但这要求在启用MySQL兼容模式之后创建数据库)。 This would solve the initial problem you're seeing (a database created with MySQL compatibility mode will have the view INFORMATION_SCHEMA.TABLES ), but it's not clear whether that will truly solve the problem of getting Grocery CRUD to work with DB2. 这将解决您遇到的最初问题(使用MySQL兼容模式创建的数据库将具有视图INFORMATION_SCHEMA.TABLES ),但是尚不清楚这是否能真正解决使Grocery CRUD与DB2一起使用的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM