http://rpg2008.blogspot.com/2008/06/ubuntu.html
http://rpg2008.blogspot.com/2008/06/ubuntu_13.html
http://rpg2008.blogspot.com/2008/06/ubuntuvirtualbox_15.html
http://rpg2008.blogspot.com/2008/06/ubuntuvirtualbox_15.html
2009年4月17日 星期五
2009年4月14日 星期二
SQL Server2005 安裝錯誤
原本我的電腦上安裝了Vistudio2005後,便自動安裝了 Microsoft SQL Server 2005 Express 版本,後來要安裝SQL2005 Develop便無法裝了,今天移除並安裝 SQL Server 2005 繁體中文的標準版時,卻發生錯誤情況,上網查了一下解決方式:
安裝 SQL Server 2005 時的效能監視器計數器錯誤
MSDN 微軟技術社群討論區 - mssql 2005 安裝有問題
MSDN 微軟技術社群討論區 - 安裝完SQL2005標準版卻不見 SQL Server Management Studio
大貓的家 - 安裝 SQL Serrver 2005 出現效能監視器計數器需求 (錯誤)
安裝 SQL Server 2005 時的效能監視器計數器錯誤
MSDN 微軟技術社群討論區 - mssql 2005 安裝有問題
MSDN 微軟技術社群討論區 - 安裝完SQL2005標準版卻不見 SQL Server Management Studio
大貓的家 - 安裝 SQL Serrver 2005 出現效能監視器計數器需求 (錯誤)
2009年4月11日 星期六
股利計算方法
假設一張股票現價:18.4
1.現金股利: 0.25
2.盈餘配股: 1.0
3.公積配股: 0.37
現金股利指的就是公司發放的是現金,
股票股利則指公司發放的是股票。
當公司發放現金股利時,叫做除息;
發放股票股利時,叫做除權。
而盈餘配股與公積配股則是以股利的來源區分
分派股利來源屬於年度盈餘者稱盈餘配股
分派股利來源屬於歷年累積之公積者稱公積配股
以一張股票來計算
「現金股利」=0.25 x 1000股= 250元
「股票股利」=盈餘配股 + 公積配股
=1.0 + 0.37= 1.37
股票股利的部份就比較複雜
這需要先計算除權後的股價,計算方式如下:
除權後新股價 = (原股價 - 現金股利) / [1+(股利/股票面額)]
這邊要注意, 台股的股票面額通常是每股10元
而不是他在股市中的市價
所以每張股票之股票股利分配的股數為=>
(股利/面額)*1000 = (1.37/10)*1000 = 137股
把所有的數字帶進去以後
除權後新股價=(18.4 - 0.25) / [1+(1.37/10)] = 18.15/1.137 =15.963
新股價為 15.963
假設明天為除權日
開盤時的股價將會是15.963
(基本上開盤價會是15.95, 因為沒有15.962的檔位, 為求解釋清楚,
此處暫忽略此問題)
你的股票股利為 15.963*137股 = 2186.93
也就是說股票股利相當於台幣 2186.93元的價值
所以, 你的股利總和市值約為 現金股利+股票股利= 2436.93
不過, 原本那張股票的股價由 18.4 變為 15.963 了
基本上, 手中所持有的股票,
除權前跟除權後(含股利)的價值是一樣的
除權前, 一張18.4元的股票市值18400
除權後, 股票市值 15963, 股利總和 2436.93, 合計為 18399.93
(些微差距為計算過程中捨去小數點後三位的結果)
1.現金股利: 0.25
2.盈餘配股: 1.0
3.公積配股: 0.37
現金股利指的就是公司發放的是現金,
股票股利則指公司發放的是股票。
當公司發放現金股利時,叫做除息;
發放股票股利時,叫做除權。
而盈餘配股與公積配股則是以股利的來源區分
分派股利來源屬於年度盈餘者稱盈餘配股
分派股利來源屬於歷年累積之公積者稱公積配股
以一張股票來計算
「現金股利」=0.25 x 1000股= 250元
「股票股利」=盈餘配股 + 公積配股
=1.0 + 0.37= 1.37
股票股利的部份就比較複雜
這需要先計算除權後的股價,計算方式如下:
除權後新股價 = (原股價 - 現金股利) / [1+(股利/股票面額)]
這邊要注意, 台股的股票面額通常是每股10元
而不是他在股市中的市價
所以每張股票之股票股利分配的股數為=>
(股利/面額)*1000 = (1.37/10)*1000 = 137股
把所有的數字帶進去以後
除權後新股價=(18.4 - 0.25) / [1+(1.37/10)] = 18.15/1.137 =15.963
新股價為 15.963
假設明天為除權日
開盤時的股價將會是15.963
(基本上開盤價會是15.95, 因為沒有15.962的檔位, 為求解釋清楚,
此處暫忽略此問題)
你的股票股利為 15.963*137股 = 2186.93
也就是說股票股利相當於台幣 2186.93元的價值
所以, 你的股利總和市值約為 現金股利+股票股利= 2436.93
不過, 原本那張股票的股價由 18.4 變為 15.963 了
基本上, 手中所持有的股票,
除權前跟除權後(含股利)的價值是一樣的
除權前, 一張18.4元的股票市值18400
除權後, 股票市值 15963, 股利總和 2436.93, 合計為 18399.93
(些微差距為計算過程中捨去小數點後三位的結果)
2009年3月24日 星期二
删除整個目錄內所有檔案的函式
以下內容轉貼自Delphi K.TOP
方式一:
可以這樣用,刪除C:\12這個資料夾,不管裡面有幾個資料夾或檔案
方式二:
參考下面的方法
此做法會連同目錄一並移除
來源:http://delphi.about.com/cs/adptips1999/a/bltip1199_2.htm
《Delete folders recursively》
//使用
if DelTree('c:\TempDir') then
ShowMessage('Directory deleted!')
else
ShowMessage('Errors occured!') ;
方式一:
可以這樣用,刪除C:\12這個資料夾,不管裡面有幾個資料夾或檔案
procedure TForm1.Button1Click(Sender: TObject);
VAR
FOS : TSHFileOpStruct;
FromNames:string;
begin
FillChar(FOS, Sizeof(TShFileOpStruct), 0);
FromNames := 'c:\12\*.*'+#0;
WITH FOS DO
Begin
Wnd := Self.Handle;
wFunc := FO_DELETE;
pFrom := PChar(FromNames);
fFlags := FOF_NoConfirmation;
End;
ShFileOperation(FOS);
//RemoveDir('c:\12');
end;
方式二:
參考下面的方法
此做法會連同目錄一並移除
來源:http://delphi.about.com/cs/adptips1999/a/bltip1199_2.htm
《Delete folders recursively》
uses ShellAPI;
Function DelTree(DirName : string): Boolean;
var
SHFileOpStruct : TSHFileOpStruct;
DirBuf : array [0..255] of char;
begin
try
Fillchar(SHFileOpStruct,Sizeof(SHFileOpStruct),0) ;
FillChar(DirBuf, Sizeof(DirBuf), 0 ) ;
StrPCopy(DirBuf, DirName) ;
with SHFileOpStruct do begin
Wnd := 0;
pFrom := @DirBuf;
wFunc := FO_DELETE;
fFlags := FOF_ALLOWUNDO;
fFlags := fFlags or FOF_NOCONFIRMATION;
fFlags := fFlags or FOF_SILENT;
end;
Result := (SHFileOperation(SHFileOpStruct) = 0) ;
except
Result := False;
end;
end;
//使用
if DelTree('c:\TempDir') then
ShowMessage('Directory deleted!')
else
ShowMessage('Errors occured!') ;
Delphi函數
以下為Delphi常用到之函數
將DATASET內之所有field名稱放至Listbox(不含彙總欄位)
DataSet.GetFieldNames(ListBox1.Items)
//檔案/目錄類
檢查有無該目錄如沒有則建立目錄
ForceDirectories 可以一次建立多層目錄
ForceDirectories('c:\xxx\yyy\zzz');
就建立 c:\xxx、c:\xxx\yyy、c:\xxx\yyy\zzz 三個目錄
複製檔案 CopyFile
取得目前所在路徑 GetCurrentDir
更改路徑 ChDir
取得目前應用程式執行檔所在位置 ExtractFilePath(Application.ExeName)
取得絕對路徑之執行檔案名稱 ExtractFileName(const FileName: string)
//字串類
字串取代 StringReplace
格式化為數字 Format('%.4d', [StrToint(MaxSeq) + 1])
比對2個字串是否相等 CompareText(const S1, S2: string): Integer;
判斷目前值是否null varisnull
//數字類
將數字固定補滿2位數 IntToDigits(cdsSelect.RecNo,2)
無條件進位 Ceil
無條件捨去 Floor
//日期類
Use DateUtils Unit
function StartOfTheMonth(const A Value: TDateTime):TDateTime;該月起始日期 function EndOfTheMonth(const A Value: TDateTime):TDateTime;該月結束日期
function DaysInMonth(const A Value: TDateTime):word;該月有幾天
use DateTimeutils;
將日期字串(yyyymmdd)轉為時間格式 DateStringToDateTime
取出星期 DayOfWeek
//其他
播放音效 sndplaysound(pchar(opendialog1.FileName), SND_ASYNC);
循環
sndPlaySound(pchar(opendialog1.FileName), SND_ASYNC + SND_LOOP);
暫停
sndPlaySound(nil,SND_ASYNC);
判斷工作管理員內是否有此應用程式
FindProcess('EXCEL.EXE')
從工作管理員強制刪除執行程序
EndProcess('EXCEL.EXE')
將DATASET內之所有field名稱放至Listbox(不含彙總欄位)
DataSet.GetFieldNames(ListBox1.Items)
//檔案/目錄類
檢查有無該目錄如沒有則建立目錄
ForceDirectories 可以一次建立多層目錄
ForceDirectories('c:\xxx\yyy\zzz');
就建立 c:\xxx、c:\xxx\yyy、c:\xxx\yyy\zzz 三個目錄
複製檔案 CopyFile
取得目前所在路徑 GetCurrentDir
更改路徑 ChDir
取得目前應用程式執行檔所在位置 ExtractFilePath(Application.ExeName)
取得絕對路徑之執行檔案名稱 ExtractFileName(const FileName: string)
//字串類
字串取代 StringReplace
格式化為數字 Format('%.4d', [StrToint(MaxSeq) + 1])
比對2個字串是否相等 CompareText(const S1, S2: string): Integer;
判斷目前值是否null varisnull
//數字類
將數字固定補滿2位數 IntToDigits(cdsSelect.RecNo,2)
無條件進位 Ceil
無條件捨去 Floor
//日期類
Use DateUtils Unit
function StartOfTheMonth(const A Value: TDateTime):TDateTime;該月起始日期 function EndOfTheMonth(const A Value: TDateTime):TDateTime;該月結束日期
function DaysInMonth(const A Value: TDateTime):word;該月有幾天
use DateTimeutils;
將日期字串(yyyymmdd)轉為時間格式 DateStringToDateTime
取出星期 DayOfWeek
//其他
播放音效 sndplaysound(pchar(opendialog1.FileName), SND_ASYNC);
循環
sndPlaySound(pchar(opendialog1.FileName), SND_ASYNC + SND_LOOP);
暫停
sndPlaySound(nil,SND_ASYNC);
判斷工作管理員內是否有此應用程式
FindProcess('EXCEL.EXE')
從工作管理員強制刪除執行程序
EndProcess('EXCEL.EXE')
轉貼DOS講義
以下文章轉貼自Delphi K.Top 轉貼DOS講義
http://hp730.tx.ntust.edu.tw/~myang/cp/dos.html
--------------------------------------------------------------------------------
一、前言
任何PC均是靠硬體及軟體之配合,才能發揮功能。軟體中不可缺少的是作業系統 -- OS (Operating System)。程式之執行,檔案之管理,磁碟之運作,均是透過 OS。目前個人電腦的 OS 有六大主流: UNIX、Mac-OS、Windows 95、Windows NT、IBM OS/2 及 DOS。其中 DOS (Disk Operating System) 為 IBM 及其相容個人電腦之作業系統。雖然現在 Windows 大行其道,但仍然有許多機關行號依舊使用 DOS 作為PC的作業系統,因此掌握DOS 的基本知識,仍有其必要性。
目前通用的 DOS 有多種產品,如:Novell NDOS、IBM PC-DOS等,而其中最通行者為Microsoft 的 MS-DOS。在Win 95下的版本是 7.0,在Win 98下則直接標明為Windows 98,不過仍有部分機器依然使用 3.3 版,而獨立發行的最後一版是 6.22 版。本講義乃根據 7.0 版編成。
DOS 指令依照其功能,可分為以下五方面:
檔案管理 (filles)
目錄管理 (directories)
磁碟管理 (disks)
公用程式 (utillities)
其他指令
二、指令基本常識
基本形式:[command] [parameters] /[switches]
通配字元 (wildcard): ? (代表單一字元) * (代表多個字元)
轉向 (redirection) 字元:< (輸入) > (輸出) >> (附加) | (傳遞)
*. 將原本應從鍵盤輸入、或輸出到螢幕之資料,改從/到指定的檔案、指令、或週邊。
內部指令-為DOS核心程式之一部分,不必從磁碟載入。如下: cd, chcp, cls, copy, ctty, date, del, dir, exit, lh, md, path, prompt, ren, rd, set, time, type, ver, verify, vol
外部指令-必須從磁碟載入之DOS指令。如下:append, assign, attrib, backup, chcp, ckdsk, command, comp, debug, defrag, deltree, diskcomp, diskcopy, doskey, edit, emm386, exe2bin, exit, expand, fasthelp, fastopen, fc, fdisk, find, format, graftabl, graphics, help, interlnk, intersvr, join, keyb, label, lh, loadfix, mem, memmaker, mirror, mode, more, move, msav, msbackup, mscdex, msd, nlsfunc, print, qbasic, recover, replace, restore, scandisk, setver, share, smartdrv, sort, subst, sys, tree, undelete, unformat, vsafe, xcopy
※在Win 98下,DOS外部指令存放於c:/windows/command之目錄下。
三、檔案管理
檔案命名-分為兩部分,前為檔名,至多 8 字,中隔一句點,其後 3 字為副名 (extension)。
檔名-可用的字元:A~Z (大小寫不拘), 0~9, _, ^, $, ~, !, #, %, &, -, {, }, (, ), ', `
禁用名稱- clock$, con, aux, com1~4, lpt1~3, nul, prn
中文檔名-自求多福,某些字會衝到。另外,DOS 會將小寫變大寫,因而使中文變碼。
副名-用以標示檔案之類別。DOS對下列名稱有特定作用:EXE, COM, SYS, BAT
檔案類型
應用程式檔-帶有副名 EXE, COM 之檔,經載入後可進行特定功能,例如 attrib.exe, edit.exe。
專屬資料檔-內含有供某一應用程式使用之資料,通常有特定副名,例如 123.ovl, abc.wk1 (lotus 123), he.hlp (he) 等。
文字檔-內容僅含有文字內碼 (ASCII, Big-5),無控制碼或機器碼。
系統檔-帶有副名 SYS 之檔,內容為硬體之資料,又稱為驅動程式 (device driver)。
批次檔-帶有副名 BAT 之文字檔,內容為 DOS 指令組成,載入後自動執行這些指令。
檔案基本資料-用指令 dir 可顯示檔案之基本資料:大小、日期、時間
Switches : /b (by line) /l (lower case) /p (pause) /s (subdirectory) /w (wide) /a (attribute): h (hidden) s (system) d (directory) a (archive) r (read-only) /o (order): d (date) e (extension) g (group) n (name) s (size)
檔案內容顯示-用指令 type abc.txt 可顯示其內容。若內容甚大,則
用type abc.txt | more 可一次顯示一頁後暫停。
複製檔案-用指令copy
單一:copy a:abc.fil b:
一組:copy a:*.fil b:
更名:copy a:abc.fil b:def.fil
接合:copy abc.fil+def.fil gh.fil
由鍵盤輸入建檔:copy con abc.txt
輸出到印表機:copy abc.txt lpt1
*. switches: /a (ASCII) /b (binary) /v (verify)
檔案改名-用指令 ren oldname.fil newname.fil;ren *.tmp *.txt
搬移檔案-用指令 move /oldpath/filename.fil /newspath
*. move 也有改名的功能,但它是外部指令,不若 ren 方便。
列印檔案-用指令 print abc.txt (Win98下無)
刪除檔案-用指令 del abc.txt;del abc.*;del a:.
復原被刪除檔案-用指令 undelete abc.txt;undelete abc.*;undelete /all (Win98下無)
比較檔案內容-用指令 fc abc.txt def.txt > result.txt
檔案屬性-用指令 attrib (+/-)[a|h|r|s] [filename] [/s]
屬性:a (archive): backup, restore, xcopy 指令用來選取須要之檔案
h (hidden):檔案為隱藏檔,用 dir 無法顯示
r (read-only):檔案為唯讀檔,無法更改內容
s (system):檔案為系統檔
顯示:attrib abc.fil;attrib c:
更改:attrib +r abc.dat
四、目錄管理
概論:
目的-為便於管理檔案,將磁碟予以區分為若干目錄 (directory),再將檔案依照其關連性,分別置於相關之目錄下。目錄下亦可有子目錄 (subdirectory)。
樹狀結構-目錄之間的關係可視為呈樹枝狀。最基本的目錄稱為根目錄 (root directory),其名稱用 \ 表之,例如 c:\。
*. 根目錄之最大檔案數:224 (1.2mb, 1.44mb), 512 (Hard Disk)
目錄名稱-最多 8 字元,可帶有副名。
目錄路徑-檔案所在的目錄結構,例如 c:\windows\system\
顯示路徑的提示-用指令 prompt:
prompt $p → c:\dos
prompt $p$g → c:\dos>
顯示樹狀結構-用指令 tree c:\windows (Win98下無)
switch: /f (filename) 顯示目錄及檔名
tree c:\ /f |more 跳頁顯示
建立新目錄-用指令 md newdir
更換目錄-用指令 cd c:\nextdir
cd .. 回到上一層目錄
cd \ 回到根目錄
刪除目錄-用指令 rd c:\emptydir *. 只有空目錄才能刪除。
*. 用指令:deltree c:\fulldir *. 連子目錄一起清除
複製目錄-用指令 xcopy c:\mydir a:\yourdir 連同子目錄及檔案一起複製。
switches: /a (archive) /d (date) /e (subdirectory)
/m (modify archive) /s (subdirectory-nonempty) /v (verify) /w (wait)
更新目錄-用指令 replace c:\mydir /u (Win98下無)
switches: /a (add) /p (prompt) /r (read-only)
/s (subdirectory) /w (wait) /u (update)
設定可執行檔之搜尋路徑-用指令 path c:\;c:\dos;c:\windows;
設定資料檔之搜尋路徑-用指令 append c:\;c:\dos;c:\windows; (Win98下無)
switches: /e (environment) /x (execute)
若僅用 append,而無隨後之引數,則顯示已設定之路徑。
若要取消,則用 append ;
目錄更名-用指令 ren \olddir \newdir 或 move \olddir \newdir
五、磁碟管理
概論-磁碟必須經過格式化 (format),才能夠儲存資料。磁碟之管理主要即為資料在磁碟上之存取及維護。
格式化磁碟-用指令 format a:
*. switches: /1 (single side) /4 (dsdd floppy)
/8 (8-sector) /f (floppy format) /q (delete old FAT)
/s (system) /u (unconditional) /v (volume label)
取消格式化磁碟-用指令 unformat a: (Win98下無)
檢查磁碟-
chkdsk a:
*. switches: /f (fix error) /v (verify file)
scandisk c:
*. 係圖形介面型之指令
*. switches: /all /autofix /checkonly /custom /mono /nosave /nosummary /surface
轉移作業系統程式到磁碟-用指令 sys c:
*. MS-DOS 系統程式有三:IO.SYS, MSDOS.SYS, COMMAND.COM,而前二者不能用 copy 轉移。
標示磁碟-用指令 label a:mydisk 1
*. 磁碟之標示最多 11 字。
複製軟碟-用指令 diskcopy a: b:
*. switches: /1 (1st side) /v (verify)
比較軟碟內容-用指令 diskcomp a: b: (Win98下無)
*. switches: /1 (1st side) /8 (8-track)
磁碟備份-用指令 backup c:\work a: (Win98下無)
*. switches: /a (add) /d (date) /f (format) /l (log)
/m (modify archive) /s (subdirectory) /t (time)
*. 可備份單一目錄、及其子目錄、特定檔案、或附加新檔到備份磁碟。
從備份復原磁碟-用指令 restore a: c:\work\*.txt (Win98下無)
*. switches: /a (after date) /b (before date) /d (display) /e (earlier than)
/l (later than) /m (modified files) /n (nonexist) /p (prompt) /s (subdirectory)
從損壞磁碟救回檔案-用指令 recover a:mybad.fil (Win98下無)
分割硬碟-用指令 fdisk
*. 進行格式化硬碟前,應先執行 fdisk,設定硬碟之主分割 (primary partition)。
六、公用程式
文書處理
*. EDIT:具有圖形界面之全畫面文書編輯程式。功能甚佳,但與中文稍有衝到。
高階程式語言-QBASIC:為 QuickBASIC 解譯程式。(Win98下無)
程式偵錯-DEBUG:用於組合語言程式之編寫、偵錯。初學者勿用。
防毒-
掃瞄磁碟上之病毒:msav(Win98下無)
監視病毒:vsafe(Win98下無)
DOS 指令解說-help(Win98下無)
*. 係圖形介面型之指令
七、其他指令
清除螢幕-cls
濾過型指令:與轉向字元配合使用,將送來的資料予以分割、重整、或摘取。
more:分頁顯示資料-例如 type c:\netlog.txt | more
find:檔案中搜尋文句-例如 find "ABCdef" abc.txt > result.txt
sort:將送來之資料排序(由小到大)-例如 sort < list.txt > newlist.txt
記憶體運用-
mem:顯示主機記憶體之使用情形。
*. switches: /c (classify) /d (debug) /p (program)
lh (Win98下無):將程式載入高位址記憶區 (UMB, Upper_Memory_Block)-例如 lh doskey
*. 在 config.sys 檔內須包括 dos=umb 方能使用此指令。
設定變數-set
顯示已設定之變數:set
設定變數:set my name=M. C. Yang
清除變數:set my name=
替身-(如非必要,請勿濫用替身)
subst:用字母充當子目錄的替身-例如 subst d: c:\dos
*. 若僅用 subst,而無隨後之引數,則顯示已設定之替身及正身。
*. 若要取消,則用 /d-例如 subst d: /d
join:用子目錄充當磁碟的替身-例如 join a: c:\driveA (Win98下無)
*. 若僅用 join,而無隨後之引數,則顯示已設定之替身及正身。
*. 若要取消,則用 /d-例如 join a: /d
八、批次檔
批次檔次級指令 (subcommand)
@ 抑制指令之顯示
*. 必須置於指令之前-例如 @echo off
call 執行另一批次檔,而後回到原檔之下一指令
choice 從鍵盤讀取選擇項,所得之選項置於 errorlevel
echo 顯示訊息到螢幕上-例如 echo this is a message
*. echo on/off 開始/停止顯示指令
*. echo 顯示目前 echo 之狀態 (on or off)
*. echo. 顯示一空行
for..in..do.. 對一檔案群或目錄群執行一指令
*. 例如 for %%a in (*.txt) do type %%a
for 所用之變數必須為 %%a ~ %%z (不管大小寫)
goto 跳到檔內之指定位置,並開始執行之
if 根據給予條件執行指令
*. exist 測試檔案是否存在-例如 if exist a.txt type a.txt
*. errorlevel 為前一程式傳回之代碼-例如 if errorlevel 1 goto one
*. == 測試是否相等-例如 if %file name%==test.bat echo ok
二 % 之間為系統變數,如例中之 file name 即是
*. not 否定測試結果-例如 if not exist a.txt goto end
pause 暫停,等待輸入
rem 註解
shift 移動置換參數 (%0 ← %1)
*. %0 ~ %9 為批次檔之引數-例如 c:\>test a b c 中:
%0 =test; %1=a; %2=b; %3=c
基本-
命名:與一般檔案相同,而副名須為 .BAT。必需避免與可執行檔同名。
使用:在系統提示 (system prompt) 時,鍵入檔名即可執行。
中斷執行:按 ^C 或 ^[BREAK]。若要暫停,則按 ^S 或 [PAUSE]。
AUTOEXEC.BAT
MS-DOS 之開機自動執行檔,通常設定搜尋路徑、系統提示,以及個別機器之作業環境(如:滑鼠、中文),或載入一些常駐程式 (TSR),例如防毒軟體等。
九、CONFIG.SYS
(這些功能在Win98下已無作用)
功能-在執行 AUTOEXEC.BAT 之前的 DOS 系統設定檔。用以載入週邊驅動程式、規劃記憶體 RAM 之使用空間。
專用指令 break 偵測 ^C 或 ^[BREAK] 之功能的開關
buffers 設定 DOS 與磁碟交換資訊之緩衝記憶體大小。
country 設定系統所使用的國別語言。
device 載入週邊驅動程式
devicehigh 載入週邊驅動程式到 UMB
dos 設定 DOS 所使用的記憶體位置
drivparm 設定磁碟的特性
fcbs 設定 DOS 可同時使用的檔案控制區塊 (FCB) 數目
files 設定 DOS 可同時開啟的檔案數目
include 引用其他區塊之指令
install 執行常駐程式
lastdrive 設定有效磁碟代號之數目
menucolor 設定文字及背景的顏色
menudefault 設定預設選項及等待時間
menuitem 定義選項名稱及提示句
numlock 設定 [NUM LOCK] 鍵之開機狀態
rem 註解
set 設定環境變數
shell 設定指令解譯程式名稱
stacks 設定 DOS 保留給處理硬體中斷之記憶體大小
submenu 類似 menuitem,但為多層次選項名稱
switches 在擴充式鍵盤上模擬傳統式鍵盤之使用法
中斷 config.sys 執行 [F5], [Shift] 結束 config.sys 執行。
[F8] 逐步確認 config.sys 之執行。
十、功能鍵
暫存區內容編輯
在 DOS 指令列之提示時,前次鍵入之指令,會保留在一暫存區 (template)。暫存區內容可用鍵盤上之功能鍵編輯,以減少指令之重複輸入。 [F1]、[→] 向右移動一個字元
[F2] 字元 顯示內容,直到該字元
[F3] 顯示其餘未顯示之字元
[F4] 字元 清除剩餘內容,直到該字元
[F5] 清除暫存內容,代之以鍵入字元
[F6] ^Z
[F7] ^@
[←]、[BS] 向左移動一個字元
[INS] 插入模式之開關
[DEL] 刪除字元
[ESC] 取消編輯
其他功能鍵 [NumLock] 數字鍵盤與功能鍵之切換
[CapsLock] 設定鍵入字母為大寫
[Shift]-[PrtScn] 將螢幕內容送至印表機
^P、^[PrtScr] 將鍵入字元同時送到螢幕及印表機
^S、[Pause] 暫停顯示
^C、^[Break] 中止顯示或中止執行
[Alt] 與數字鍵盤結合,以產生任何 ASCII 字元
十一、多重開機設定
(在Win98下無作用)
Config.sys 檔
從 6.0 版起,DOS 在開機時可以用不同的設定。其關鍵在於 config.sys 可以模組化。每一個模組稱為「組態區塊」 (configuration block)。
組態區塊的結構:由「區塊標題」 (block header) 帶頭的一段文字,其內容為 config.sys 指令。所謂區塊標題,乃是用方括號所括起的名稱。
一個多重開機型的 config.sys 檔,其第一個模組為 [menu],用以敘述此檔的各個開機模式。下面為一例:
[menu]
menuitem=normal, Normal Start Configuration
menuitem=test, For testing
menucolor=15,1
menudefault=normal,5
[common]
device=c:\dos\himem.sys
dos=high
buffers=40
files=40
[normal]
device=c:\dos\emm386.exe x=c000-c800 noems
set path=c:\dos;c:\windows;
[test]
device=c:\dos\emm386.exe 2048 x=c000-c800
set path=c:\windows;
[common]
上例中,menuitem 之後為組態名稱及其提示,menucolor 後為前景 (15, 白) 及背景 (1, 藍) 的顏色,menudefault 指定開機預設組態 (normal) 及等待時間 (5 sec)。
[common] 模組為共通設定,不必寫在 [menu] 模組內。而最後之 [common] 則是為了給未來其他軟體修改 config.sys 用。
Autoexec.bat
經由多重開機所得的系統,其環境參數 config 為其開機組態名稱。
利用此參數,並用語法 goto %config%,可以從而控制 autoexec.bat 的執行步驟。下面為一例。
@echo off
prompt $p$g
goto %config%
:normal
smartdrv
win
goto end
:test
et3
goto end
:end
http://hp730.tx.ntust.edu.tw/~myang/cp/dos.html
--------------------------------------------------------------------------------
一、前言
任何PC均是靠硬體及軟體之配合,才能發揮功能。軟體中不可缺少的是作業系統 -- OS (Operating System)。程式之執行,檔案之管理,磁碟之運作,均是透過 OS。目前個人電腦的 OS 有六大主流: UNIX、Mac-OS、Windows 95、Windows NT、IBM OS/2 及 DOS。其中 DOS (Disk Operating System) 為 IBM 及其相容個人電腦之作業系統。雖然現在 Windows 大行其道,但仍然有許多機關行號依舊使用 DOS 作為PC的作業系統,因此掌握DOS 的基本知識,仍有其必要性。
目前通用的 DOS 有多種產品,如:Novell NDOS、IBM PC-DOS等,而其中最通行者為Microsoft 的 MS-DOS。在Win 95下的版本是 7.0,在Win 98下則直接標明為Windows 98,不過仍有部分機器依然使用 3.3 版,而獨立發行的最後一版是 6.22 版。本講義乃根據 7.0 版編成。
DOS 指令依照其功能,可分為以下五方面:
檔案管理 (filles)
目錄管理 (directories)
磁碟管理 (disks)
公用程式 (utillities)
其他指令
二、指令基本常識
基本形式:[command] [parameters] /[switches]
通配字元 (wildcard): ? (代表單一字元) * (代表多個字元)
轉向 (redirection) 字元:< (輸入) > (輸出) >> (附加) | (傳遞)
*. 將原本應從鍵盤輸入、或輸出到螢幕之資料,改從/到指定的檔案、指令、或週邊。
內部指令-為DOS核心程式之一部分,不必從磁碟載入。如下: cd, chcp, cls, copy, ctty, date, del, dir, exit, lh, md, path, prompt, ren, rd, set, time, type, ver, verify, vol
外部指令-必須從磁碟載入之DOS指令。如下:append, assign, attrib, backup, chcp, ckdsk, command, comp, debug, defrag, deltree, diskcomp, diskcopy, doskey, edit, emm386, exe2bin, exit, expand, fasthelp, fastopen, fc, fdisk, find, format, graftabl, graphics, help, interlnk, intersvr, join, keyb, label, lh, loadfix, mem, memmaker, mirror, mode, more, move, msav, msbackup, mscdex, msd, nlsfunc, print, qbasic, recover, replace, restore, scandisk, setver, share, smartdrv, sort, subst, sys, tree, undelete, unformat, vsafe, xcopy
※在Win 98下,DOS外部指令存放於c:/windows/command之目錄下。
三、檔案管理
檔案命名-分為兩部分,前為檔名,至多 8 字,中隔一句點,其後 3 字為副名 (extension)。
檔名-可用的字元:A~Z (大小寫不拘), 0~9, _, ^, $, ~, !, #, %, &, -, {, }, (, ), ', `
禁用名稱- clock$, con, aux, com1~4, lpt1~3, nul, prn
中文檔名-自求多福,某些字會衝到。另外,DOS 會將小寫變大寫,因而使中文變碼。
副名-用以標示檔案之類別。DOS對下列名稱有特定作用:EXE, COM, SYS, BAT
檔案類型
應用程式檔-帶有副名 EXE, COM 之檔,經載入後可進行特定功能,例如 attrib.exe, edit.exe。
專屬資料檔-內含有供某一應用程式使用之資料,通常有特定副名,例如 123.ovl, abc.wk1 (lotus 123), he.hlp (he) 等。
文字檔-內容僅含有文字內碼 (ASCII, Big-5),無控制碼或機器碼。
系統檔-帶有副名 SYS 之檔,內容為硬體之資料,又稱為驅動程式 (device driver)。
批次檔-帶有副名 BAT 之文字檔,內容為 DOS 指令組成,載入後自動執行這些指令。
檔案基本資料-用指令 dir 可顯示檔案之基本資料:大小、日期、時間
Switches : /b (by line) /l (lower case) /p (pause) /s (subdirectory) /w (wide) /a (attribute): h (hidden) s (system) d (directory) a (archive) r (read-only) /o (order): d (date) e (extension) g (group) n (name) s (size)
檔案內容顯示-用指令 type abc.txt 可顯示其內容。若內容甚大,則
用type abc.txt | more 可一次顯示一頁後暫停。
複製檔案-用指令copy
單一:copy a:abc.fil b:
一組:copy a:*.fil b:
更名:copy a:abc.fil b:def.fil
接合:copy abc.fil+def.fil gh.fil
由鍵盤輸入建檔:copy con abc.txt
輸出到印表機:copy abc.txt lpt1
*. switches: /a (ASCII) /b (binary) /v (verify)
檔案改名-用指令 ren oldname.fil newname.fil;ren *.tmp *.txt
搬移檔案-用指令 move /oldpath/filename.fil /newspath
*. move 也有改名的功能,但它是外部指令,不若 ren 方便。
列印檔案-用指令 print abc.txt (Win98下無)
刪除檔案-用指令 del abc.txt;del abc.*;del a:.
復原被刪除檔案-用指令 undelete abc.txt;undelete abc.*;undelete /all (Win98下無)
比較檔案內容-用指令 fc abc.txt def.txt > result.txt
檔案屬性-用指令 attrib (+/-)[a|h|r|s] [filename] [/s]
屬性:a (archive): backup, restore, xcopy 指令用來選取須要之檔案
h (hidden):檔案為隱藏檔,用 dir 無法顯示
r (read-only):檔案為唯讀檔,無法更改內容
s (system):檔案為系統檔
顯示:attrib abc.fil;attrib c:
更改:attrib +r abc.dat
四、目錄管理
概論:
目的-為便於管理檔案,將磁碟予以區分為若干目錄 (directory),再將檔案依照其關連性,分別置於相關之目錄下。目錄下亦可有子目錄 (subdirectory)。
樹狀結構-目錄之間的關係可視為呈樹枝狀。最基本的目錄稱為根目錄 (root directory),其名稱用 \ 表之,例如 c:\。
*. 根目錄之最大檔案數:224 (1.2mb, 1.44mb), 512 (Hard Disk)
目錄名稱-最多 8 字元,可帶有副名。
目錄路徑-檔案所在的目錄結構,例如 c:\windows\system\
顯示路徑的提示-用指令 prompt:
prompt $p → c:\dos
prompt $p$g → c:\dos>
顯示樹狀結構-用指令 tree c:\windows (Win98下無)
switch: /f (filename) 顯示目錄及檔名
tree c:\ /f |more 跳頁顯示
建立新目錄-用指令 md newdir
更換目錄-用指令 cd c:\nextdir
cd .. 回到上一層目錄
cd \ 回到根目錄
刪除目錄-用指令 rd c:\emptydir *. 只有空目錄才能刪除。
*. 用指令:deltree c:\fulldir *. 連子目錄一起清除
複製目錄-用指令 xcopy c:\mydir a:\yourdir 連同子目錄及檔案一起複製。
switches: /a (archive) /d (date) /e (subdirectory)
/m (modify archive) /s (subdirectory-nonempty) /v (verify) /w (wait)
更新目錄-用指令 replace c:\mydir /u (Win98下無)
switches: /a (add) /p (prompt) /r (read-only)
/s (subdirectory) /w (wait) /u (update)
設定可執行檔之搜尋路徑-用指令 path c:\;c:\dos;c:\windows;
設定資料檔之搜尋路徑-用指令 append c:\;c:\dos;c:\windows; (Win98下無)
switches: /e (environment) /x (execute)
若僅用 append,而無隨後之引數,則顯示已設定之路徑。
若要取消,則用 append ;
目錄更名-用指令 ren \olddir \newdir 或 move \olddir \newdir
五、磁碟管理
概論-磁碟必須經過格式化 (format),才能夠儲存資料。磁碟之管理主要即為資料在磁碟上之存取及維護。
格式化磁碟-用指令 format a:
*. switches: /1 (single side) /4 (dsdd floppy)
/8 (8-sector) /f (floppy format) /q (delete old FAT)
/s (system) /u (unconditional) /v (volume label)
取消格式化磁碟-用指令 unformat a: (Win98下無)
檢查磁碟-
chkdsk a:
*. switches: /f (fix error) /v (verify file)
scandisk c:
*. 係圖形介面型之指令
*. switches: /all /autofix /checkonly /custom /mono /nosave /nosummary /surface
轉移作業系統程式到磁碟-用指令 sys c:
*. MS-DOS 系統程式有三:IO.SYS, MSDOS.SYS, COMMAND.COM,而前二者不能用 copy 轉移。
標示磁碟-用指令 label a:mydisk 1
*. 磁碟之標示最多 11 字。
複製軟碟-用指令 diskcopy a: b:
*. switches: /1 (1st side) /v (verify)
比較軟碟內容-用指令 diskcomp a: b: (Win98下無)
*. switches: /1 (1st side) /8 (8-track)
磁碟備份-用指令 backup c:\work a: (Win98下無)
*. switches: /a (add) /d (date) /f (format) /l (log)
/m (modify archive) /s (subdirectory) /t (time)
*. 可備份單一目錄、及其子目錄、特定檔案、或附加新檔到備份磁碟。
從備份復原磁碟-用指令 restore a: c:\work\*.txt (Win98下無)
*. switches: /a (after date) /b (before date) /d (display) /e (earlier than)
/l (later than) /m (modified files) /n (nonexist) /p (prompt) /s (subdirectory)
從損壞磁碟救回檔案-用指令 recover a:mybad.fil (Win98下無)
分割硬碟-用指令 fdisk
*. 進行格式化硬碟前,應先執行 fdisk,設定硬碟之主分割 (primary partition)。
六、公用程式
文書處理
*. EDIT:具有圖形界面之全畫面文書編輯程式。功能甚佳,但與中文稍有衝到。
高階程式語言-QBASIC:為 QuickBASIC 解譯程式。(Win98下無)
程式偵錯-DEBUG:用於組合語言程式之編寫、偵錯。初學者勿用。
防毒-
掃瞄磁碟上之病毒:msav(Win98下無)
監視病毒:vsafe(Win98下無)
DOS 指令解說-help(Win98下無)
*. 係圖形介面型之指令
七、其他指令
清除螢幕-cls
濾過型指令:與轉向字元配合使用,將送來的資料予以分割、重整、或摘取。
more:分頁顯示資料-例如 type c:\netlog.txt | more
find:檔案中搜尋文句-例如 find "ABCdef" abc.txt > result.txt
sort:將送來之資料排序(由小到大)-例如 sort < list.txt > newlist.txt
記憶體運用-
mem:顯示主機記憶體之使用情形。
*. switches: /c (classify) /d (debug) /p (program)
lh (Win98下無):將程式載入高位址記憶區 (UMB, Upper_Memory_Block)-例如 lh doskey
*. 在 config.sys 檔內須包括 dos=umb 方能使用此指令。
設定變數-set
顯示已設定之變數:set
設定變數:set my name=M. C. Yang
清除變數:set my name=
替身-(如非必要,請勿濫用替身)
subst:用字母充當子目錄的替身-例如 subst d: c:\dos
*. 若僅用 subst,而無隨後之引數,則顯示已設定之替身及正身。
*. 若要取消,則用 /d-例如 subst d: /d
join:用子目錄充當磁碟的替身-例如 join a: c:\driveA (Win98下無)
*. 若僅用 join,而無隨後之引數,則顯示已設定之替身及正身。
*. 若要取消,則用 /d-例如 join a: /d
八、批次檔
批次檔次級指令 (subcommand)
@ 抑制指令之顯示
*. 必須置於指令之前-例如 @echo off
call 執行另一批次檔,而後回到原檔之下一指令
choice 從鍵盤讀取選擇項,所得之選項置於 errorlevel
echo 顯示訊息到螢幕上-例如 echo this is a message
*. echo on/off 開始/停止顯示指令
*. echo 顯示目前 echo 之狀態 (on or off)
*. echo. 顯示一空行
for..in..do.. 對一檔案群或目錄群執行一指令
*. 例如 for %%a in (*.txt) do type %%a
for 所用之變數必須為 %%a ~ %%z (不管大小寫)
goto 跳到檔內之指定位置,並開始執行之
if 根據給予條件執行指令
*. exist 測試檔案是否存在-例如 if exist a.txt type a.txt
*. errorlevel 為前一程式傳回之代碼-例如 if errorlevel 1 goto one
*. == 測試是否相等-例如 if %file name%==test.bat echo ok
二 % 之間為系統變數,如例中之 file name 即是
*. not 否定測試結果-例如 if not exist a.txt goto end
pause 暫停,等待輸入
rem 註解
shift 移動置換參數 (%0 ← %1)
*. %0 ~ %9 為批次檔之引數-例如 c:\>test a b c 中:
%0 =test; %1=a; %2=b; %3=c
基本-
命名:與一般檔案相同,而副名須為 .BAT。必需避免與可執行檔同名。
使用:在系統提示 (system prompt) 時,鍵入檔名即可執行。
中斷執行:按 ^C 或 ^[BREAK]。若要暫停,則按 ^S 或 [PAUSE]。
AUTOEXEC.BAT
MS-DOS 之開機自動執行檔,通常設定搜尋路徑、系統提示,以及個別機器之作業環境(如:滑鼠、中文),或載入一些常駐程式 (TSR),例如防毒軟體等。
九、CONFIG.SYS
(這些功能在Win98下已無作用)
功能-在執行 AUTOEXEC.BAT 之前的 DOS 系統設定檔。用以載入週邊驅動程式、規劃記憶體 RAM 之使用空間。
專用指令 break 偵測 ^C 或 ^[BREAK] 之功能的開關
buffers 設定 DOS 與磁碟交換資訊之緩衝記憶體大小。
country 設定系統所使用的國別語言。
device 載入週邊驅動程式
devicehigh 載入週邊驅動程式到 UMB
dos 設定 DOS 所使用的記憶體位置
drivparm 設定磁碟的特性
fcbs 設定 DOS 可同時使用的檔案控制區塊 (FCB) 數目
files 設定 DOS 可同時開啟的檔案數目
include 引用其他區塊之指令
install 執行常駐程式
lastdrive 設定有效磁碟代號之數目
menucolor 設定文字及背景的顏色
menudefault 設定預設選項及等待時間
menuitem 定義選項名稱及提示句
numlock 設定 [NUM LOCK] 鍵之開機狀態
rem 註解
set 設定環境變數
shell 設定指令解譯程式名稱
stacks 設定 DOS 保留給處理硬體中斷之記憶體大小
submenu 類似 menuitem,但為多層次選項名稱
switches 在擴充式鍵盤上模擬傳統式鍵盤之使用法
中斷 config.sys 執行 [F5], [Shift] 結束 config.sys 執行。
[F8] 逐步確認 config.sys 之執行。
十、功能鍵
暫存區內容編輯
在 DOS 指令列之提示時,前次鍵入之指令,會保留在一暫存區 (template)。暫存區內容可用鍵盤上之功能鍵編輯,以減少指令之重複輸入。 [F1]、[→] 向右移動一個字元
[F2] 字元 顯示內容,直到該字元
[F3] 顯示其餘未顯示之字元
[F4] 字元 清除剩餘內容,直到該字元
[F5] 清除暫存內容,代之以鍵入字元
[F6] ^Z
[F7] ^@
[←]、[BS] 向左移動一個字元
[INS] 插入模式之開關
[DEL] 刪除字元
[ESC] 取消編輯
其他功能鍵 [NumLock] 數字鍵盤與功能鍵之切換
[CapsLock] 設定鍵入字母為大寫
[Shift]-[PrtScn] 將螢幕內容送至印表機
^P、^[PrtScr] 將鍵入字元同時送到螢幕及印表機
^S、[Pause] 暫停顯示
^C、^[Break] 中止顯示或中止執行
[Alt] 與數字鍵盤結合,以產生任何 ASCII 字元
十一、多重開機設定
(在Win98下無作用)
Config.sys 檔
從 6.0 版起,DOS 在開機時可以用不同的設定。其關鍵在於 config.sys 可以模組化。每一個模組稱為「組態區塊」 (configuration block)。
組態區塊的結構:由「區塊標題」 (block header) 帶頭的一段文字,其內容為 config.sys 指令。所謂區塊標題,乃是用方括號所括起的名稱。
一個多重開機型的 config.sys 檔,其第一個模組為 [menu],用以敘述此檔的各個開機模式。下面為一例:
[menu]
menuitem=normal, Normal Start Configuration
menuitem=test, For testing
menucolor=15,1
menudefault=normal,5
[common]
device=c:\dos\himem.sys
dos=high
buffers=40
files=40
[normal]
device=c:\dos\emm386.exe x=c000-c800 noems
set path=c:\dos;c:\windows;
[test]
device=c:\dos\emm386.exe 2048 x=c000-c800
set path=c:\windows;
[common]
上例中,menuitem 之後為組態名稱及其提示,menucolor 後為前景 (15, 白) 及背景 (1, 藍) 的顏色,menudefault 指定開機預設組態 (normal) 及等待時間 (5 sec)。
[common] 模組為共通設定,不必寫在 [menu] 模組內。而最後之 [common] 則是為了給未來其他軟體修改 config.sys 用。
Autoexec.bat
經由多重開機所得的系統,其環境參數 config 為其開機組態名稱。
利用此參數,並用語法 goto %config%,可以從而控制 autoexec.bat 的執行步驟。下面為一例。
@echo off
prompt $p$g
goto %config%
:normal
smartdrv
win
goto end
:test
et3
goto end
:end
2009年3月23日 星期一
2009年3月20日 星期五
酵素DIY
因為家裡的小朋友是過敏兒,所以打算給他吃酵素改善體質
但是 市面上ㄉ酵素還真不是普通的貴阿
乾脆DIY
以下是幾個我在網路上看到有關酵素的文章....:
酵素養生法
自製鳯梨酵素
青蘋果酵素製作
柳橙酵素+葡萄柚酵素
火龍果酵素
蘋果酵素~開封說明
奇異果酵素DIY~開封說明
水果酵素如何製作
酵素製作
青木瓜酵素要如何制做
水果酵素如何製作-桑椹
另一個觀點:
真的很不建議大家自己做酵素
但是 市面上ㄉ酵素還真不是普通的貴阿
乾脆DIY
以下是幾個我在網路上看到有關酵素的文章....:
酵素養生法
自製鳯梨酵素
青蘋果酵素製作
柳橙酵素+葡萄柚酵素
火龍果酵素
蘋果酵素~開封說明
奇異果酵素DIY~開封說明
水果酵素如何製作
酵素製作
青木瓜酵素要如何制做
水果酵素如何製作-桑椹
另一個觀點:
真的很不建議大家自己做酵素
2009年3月19日 星期四
BDE錯誤訊息-Insufficient memory for this operation" ($2501)
以下為BDE錯誤訊息(Insufficient memory for this operation" ($2501))之解決步驟:設定值必須要關掉EEP-AP,重開AP 的服務才會有效。
Insufficient memory for this operation" ($2501)
Problem: Your application (or another BDE application) has exhausted the memory available to the BDE.
Solution:
1) Close all BDE applications.
2) Find the program BDEADMIN.EXE. This is usually in a directory somewhere under "\Program Files\Borland...".
3) Run BDEADMIN.EXE and click on the Configuration tab.
4) There should be an item in the treeview on the left side called "Configuration". If it's not expanded, expand it.
5) Next, expand the System entry below it. Under System, select INIT.
6) In the right-side window, find the entry called "SHAREDMEMSIZE". Change this value to 4096.
7) Next, click on the word "Object" in the main window's menu bar, and select Apply.
8) Answer "OK" to the confirmation to "Save all edits...".
You can now try to start your application again. If you still have trouble running the application and you are running Windows NT or Windows 2000, follow the same instructions above, but this time leave the SHAREDMEMSIZE property at 4096, and change the SHAREDMEMLOCATION property to "0x5BDE". Then apply the changes as before, and retry your application. If you still receive the same error, try changing SHAREDMEMSIZE to 8192. If the error continues to persist, you can also try "0x6BDE" for SHAREDMEMLOCATION. If the error still continues to persist, you can also try other values for SHAREDMEMLOCATION. (See solution for error $210D below.)
Insufficient memory for this operation" ($2501)
Problem: Your application (or another BDE application) has exhausted the memory available to the BDE.
Solution:
1) Close all BDE applications.
2) Find the program BDEADMIN.EXE. This is usually in a directory somewhere under "\Program Files\Borland...".
3) Run BDEADMIN.EXE and click on the Configuration tab.
4) There should be an item in the treeview on the left side called "Configuration". If it's not expanded, expand it.
5) Next, expand the System entry below it. Under System, select INIT.
6) In the right-side window, find the entry called "SHAREDMEMSIZE". Change this value to 4096.
7) Next, click on the word "Object" in the main window's menu bar, and select Apply.
8) Answer "OK" to the confirmation to "Save all edits...".
You can now try to start your application again. If you still have trouble running the application and you are running Windows NT or Windows 2000, follow the same instructions above, but this time leave the SHAREDMEMSIZE property at 4096, and change the SHAREDMEMLOCATION property to "0x5BDE". Then apply the changes as before, and retry your application. If you still receive the same error, try changing SHAREDMEMSIZE to 8192. If the error continues to persist, you can also try "0x6BDE" for SHAREDMEMLOCATION. If the error still continues to persist, you can also try other values for SHAREDMEMLOCATION. (See solution for error $210D below.)
BDE錯誤訊息-Shared memory conflict ($210D)
以下為BDE錯誤訊息(Shared memory conflict ($210D) )之解決步驟:"Shared memory conflict ($210D)
Problem: The BDE is trying to use a location in memory that is already in use by the operating system or another application.
Solution:
1) Close all BDE applications.
2) Find the program BDEADMIN.EXE. This is usually in a directory somewhere under "\Program Files\Borland...".
3) Run BDEADMIN.EXE and click on the Configuration tab.
4) There should be an item in the treeview on the left side called "Configuration". If it's not expanded, expand it.
5) Next, expand the System entry below it. Under System, select INIT.
6) In the right-side window, find the entry called "SHAREDMEMLOCATION". Change this value to 5BDE.
7) Next, click on the word "Object" in the main window's menu bar, and select Apply.
8) Answer "OK" to the confirmation to "Save all edits...".
Other values that may also help solve this issue on NT or Windows 2000 are: 1000, 7000, and 7F00. If none of these values resolve the issue, you may try 2000, 3000, 4000, etc. or any values in between the specified ranges below for each operating system:
Windows 95/98: SHAREDMEMLOCATION = 9000 to FFFF
Windows NT/2000: SHAREDMEMLOCATION = 1000 to 7F00
It has also been reported by some users that removing or disabling the driver for a sound card on Windows NT can resolve the issue as well, but normally just "relocating" the BDE's memory pool using the SHAREDMEMLOCATION setting will suffice.
Problem: The BDE is trying to use a location in memory that is already in use by the operating system or another application.
Solution:
1) Close all BDE applications.
2) Find the program BDEADMIN.EXE. This is usually in a directory somewhere under "\Program Files\Borland...".
3) Run BDEADMIN.EXE and click on the Configuration tab.
4) There should be an item in the treeview on the left side called "Configuration". If it's not expanded, expand it.
5) Next, expand the System entry below it. Under System, select INIT.
6) In the right-side window, find the entry called "SHAREDMEMLOCATION". Change this value to 5BDE.
7) Next, click on the word "Object" in the main window's menu bar, and select Apply.
8) Answer "OK" to the confirmation to "Save all edits...".
Other values that may also help solve this issue on NT or Windows 2000 are: 1000, 7000, and 7F00. If none of these values resolve the issue, you may try 2000, 3000, 4000, etc. or any values in between the specified ranges below for each operating system:
Windows 95/98: SHAREDMEMLOCATION = 9000 to FFFF
Windows NT/2000: SHAREDMEMLOCATION = 1000 to 7F00
It has also been reported by some users that removing or disabling the driver for a sound card on Windows NT can resolve the issue as well, but normally just "relocating" the BDE's memory pool using the SHAREDMEMLOCATION setting will suffice.
訂閱:
文章 (Atom)