請教大大們,用Delphi 連DBase3出現的錯誤 |
缺席
|
wychen57
一般會員 ![]() ![]() 發表:32 回覆:77 積分:21 註冊:2003-10-04 發送簡訊給我 |
小弟有先爬文過,但都沒大大提到小弟遇到的錯誤訊息,所以發文請教大大們錯誤是啥
小弟採用的是ADOTABLE直接定義連線字串,連接後遇到兩種錯誤碼,第一種為"無法載入驅動程式 15877",第二種為"Could not convert variant of type(null) into type (string)",小弟的環境為Windows XP SP2 Eng,mdac 2.8無法安裝在此 OS,下列為小弟之程式,還麻煩大大不吝指教一下,謝謝 連線字串: DSN=COS;DefaultDir=C:\FMS\DATA\THAILIN\COS;DriverId=21;FIL=dBase III;MaxBufferSize=2048;PageTimeout=600; <textarea class="delphi" rows="10" cols="60" name="code">procedure TForm1.Timer1Timer(Sender: TObject); var i : integer; AlmState : Integer; begin ADOTable1.Active := True; AlmState := 0; Timer1.Enabled := False; if ADOTable1.Recordset.RecordCount > 0 then begin ADOTable1.First ; while (not ADOTable1.Eof) do begin if ADOTable1.FieldByName('NOTES').Value =0 then inc(AlmState); ADOTable1.Next end; if AlmState > 0 then Showmessage('System has Alarm present'); end else begin ADOTable1.Active :=False; Timer1.Enabled := True; end; end; </textarea> 編輯記錄
taishyang 重新編輯於 2007-05-07 09:36:57, 註解 將文章分類成[問題]‧
|
pcboy
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:177 回覆:1838 積分:1463 註冊:2004-01-13 發送簡訊給我 |
Microsoft Data Access Components (MDAC) 2.8 http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-b037-185d0506396c&DisplayLang=en System Requirements Supported Operating Systems: Windows 2000; Windows 98; Windows ME; Windows NT; Windows XP Available for x86-based computers only 無法安裝? 錯誤訊息是什麼 ? Could not convert variant of type(null) into type (string) 無法轉換 NULL 型態成為 String 型態 您可以先將欄位中的 NULL 換成 沒有內容的字串
------
能力不足,求助於人;有能力時,幫幫別人;如果您滿意答覆,請適時結案! 子曰:問有三種,不懂則問,雖懂有疑則問,雖懂而想知更多則問! |
wychen57
一般會員 ![]() ![]() 發表:32 回覆:77 積分:21 註冊:2003-10-04 發送簡訊給我 |
===================引 用 pcboy 文 章=================== Microsoft Data Access Components (MDAC) 2.8 http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-b037-185d0506396c&DisplayLang=en System Requirements Supported Operating Systems: Windows 2000; Windows 98; Windows ME; Windows NT; Windows XP Available for x86-based computers only 無法安裝? 錯誤訊息是什麼 ? "MDAC 2.8 RTM is incompatible with this version of Windows. All of its features are currently part of Windows".,確定鈕為反白無法點選 Could not convert variant of type(null) into type (string) 無法轉換 NULL 型態成為 String 型態 您可以先將欄位中的 NULL 換成 沒有內容的字串 小弟問題就出在"ADOTable1.Active := True;",這行就會出現"Could not convert variant of type(null) into type (string)", 如果事先在設計階段就把Active屬性設為True,就會出現"無法載入驅動程式 15877" 並不能如大大所說的,把欄位中的null先轉換,因為連不上!如果要去修改原始dbase資料庫更不可行,因為那個資料庫是一個生產線控制系統的資料庫, 一但對那個資料庫做任何變更動作就會導致系統crash,影響生產線的運作
編輯記錄
wychen57 重新編輯於 2007-05-07 09:46:24, 註解 無‧
|
wychen57
一般會員 ![]() ![]() 發表:32 回覆:77 積分:21 註冊:2003-10-04 發送簡訊給我 |
|
wychen57
一般會員 ![]() ![]() 發表:32 回覆:77 積分:21 註冊:2003-10-04 發送簡訊給我 |
|
sryang
尊榮會員 ![]() ![]() ![]() ![]() ![]() ![]() 發表:39 回覆:762 積分:920 註冊:2002-06-27 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |