問(wèn)題分析:
在使用官方轉(zhuǎn)換程序轉(zhuǎn)換過(guò)程中出現(xiàn)“在對(duì)應(yīng)所需名稱(chēng)或序數(shù)的集合中,未找到項(xiàng)目”的錯(cuò)誤提示。這種問(wèn)題,大多出現(xiàn)在 Access 數(shù)據(jù)庫(kù)轉(zhuǎn)換為 Discuz! 的過(guò)程中。主要是因?yàn)樵瓟?shù)據(jù)庫(kù)相應(yīng)數(shù)據(jù)庫(kù)表中包含的字段與轉(zhuǎn)換程序中不完全符合,從而造成了轉(zhuǎn)換程序找不到原數(shù)據(jù)庫(kù)表中對(duì)應(yīng)的字段,提示錯(cuò)誤。
解決方法:
將轉(zhuǎn)換程序中的字段與原數(shù)據(jù)庫(kù)表字段相比較,去除轉(zhuǎn)換程序中的多余字段,然后保存,重新開(kāi)始轉(zhuǎn)換。
下面以 Leadbbs4.0 Access 數(shù)據(jù)庫(kù)轉(zhuǎn)換到 Discuz! 6.0 為例,來(lái)說(shuō)明具體如何修改:
假設(shè)轉(zhuǎn)換過(guò)程中出現(xiàn)以下問(wèn)題提示:
Fatal error: Uncaught exception 'com_exception' with message 'Source: ADODB.Fields
Description: 在對(duì)應(yīng)所需名稱(chēng)或序數(shù)的集合中,未找到項(xiàng)目。' in E:\www\dzbbs60\XConvert\data\leadbbs40ac\step_1.php:15 Stack trace: #0 E:\www\dzbbs60\XConvert\data\leadbbs40ac\step_1.php(15): unknown() #1 E:\www\dzbbs60\XConvert\include\convert.inc.php(66): require_once('E:\www\dzbbs60\...') #2 E:\www\dzbbs60\XConvert\index.php(14): require_once('E:\www\dzbbs60\...') #3 {main} thrown in E:\www\dzbbs60\XConvert\data\leadbbs40ac\step_1.php on line 15
那么,根據(jù)以上提示,打開(kāi) E:\www\dzbbs60\XConvert\data\leadbbs40ac\step_1.php,搜索找到:
$fieldarray = array('id', 'username', 'pass', 'mail', 'address', 'sex', 'birthday', 'applytime', 'icq', 'oicq', 'sessionid', 'online', 'prevtime', 'userphoto', 'ip', 'userlevel', 'homepage', 'underwrite', 'printunderwrite', 'points', 'officer', 'login_ip', 'login_oknum', 'login_falsenum', 'login_lastpass', 'login_rightip', 'onlinetime', 'announcenum', 'lastdoingtime', 'faceurl', 'facewidth', 'faceheight', 'userlimit', 'showflag', 'messageflag', 'nonglibirth', 'announcetopic', 'announcegood', 'uploadnum', 'charmpoint', 'cachetvalue', 'usertitle', 'notsecret', 'question', 'answer', 'lockip', 'lastwritetime', 'extentflag', 'idcard', 'mobiletel', 'telephone', 'truename', 'lastannounceid', 'announcenum2');
因?yàn)榈谝徊?step_1.php 轉(zhuǎn)換的是會(huì)員數(shù)據(jù),因此打開(kāi)原 Access 數(shù)據(jù)庫(kù)中的會(huì)員表 user 表,將其中的字段與上面 $fieldarray 中的字段比較,去除轉(zhuǎn)換程序中多余的字段,然后保存轉(zhuǎn)換程序,重新開(kāi)始轉(zhuǎn)換。
如對(duì)本文有疑問(wèn),請(qǐng)?zhí)峤坏浇涣髡搲?,廣大熱心網(wǎng)友會(huì)為你解答!! 點(diǎn)擊進(jìn)入論壇