2007年11月29日 星期四

dbExpress(DBX4) AS400 Driver

在安裝RAD Studio DELPHI 2007後,C:\Documents and Settings\user\My Documents\RAD Studio\5.0\Demos\database\projects\dbx\driver\as400資料夾中有提供連接AS400的Driver。

Installation instructions for dbexpca400 (dbExpress driver)

##CONTINUE##

-----------------------------------------------------------

0) set up your iSeries or AS/400 connection in iSeries Access, for this example the connection is called "MYAS400" (usually this is already configured)

1) copy dbexpca400.dll to a directory that is in your path, make sure only one version of dbexpca400.dll is on your system. The Windows\system or WINNT\system32 directory is a good place for the driver.

(optional) copy dbexpca400.obj and iseriesaccess.obj to $(BCB)\Lib for C++Builder 6 (optional) copy dbexpca400.dcu and iseriesaccess.dcu to $(Delphi)\Lib for Delphi 7 or 6

2) modify dbXDrivers.ini, depending on your Delphi version in

Delphi 2007: %Public%\Documents\RAD Studio\dbexpress Delphi 2005: %CommonProgramFiles%\Borland Shared\BDS\dbExpress Delphi 2006: %ProgramFiles%\BDS\4.0\dbexpress Delphi 6, Delphi 7, C++Builder 6: %CommonProgramFiles%\Borland Shared\DBExpress\

[Installed Drivers] CA400=1

[CA400] GetDriverFunc=getSQLDriverCA400 LibraryName=dbexpca400.dll VendorLib=cwbdb.dll Database=MYAS400 User_Name= Password= ServerCharSet= ErrorResourceFile= LocaleCode=0000 BlobSize=-1 RowsetSize=-1 RoleName= CA400 TransIsolation=DirtyRead CommitRetain=True AutoCommit=True Custom String=/trace=0 Connection Timeout=-1 Trim Char=False

[CA400 TransIsolation] DirtyRead=0 ReadCommited=1 RepeatableRead=2

3) drop a TSQLConnection on a form, double click the TSQLConnection then choose "+ Add Connection", select driver name "CA400" and give your connection a name, for example "MYCA400CONN". Check that Database is set to the connection you defined in iSeries Access (MYAS400)

4) set the "LoginPrompt" property of SQLConnection to false if you don't want to be prompted for a password (the connection security is maintained by iSeries Access)

5) drop a TSQLQuery on your form, set it's SQLConnection property to your SQLConnection. Set the SQL property to for example 'select * from "QIWS"."QCUSTCDT"' (QIWS.QCUSTCDT is a standard table on every iSeries system)

Borland Database Engine (BDE) 移植到DBX4方法

首先下載http://www.bluetrainsoftware.com/developersinc/dbx_bde.zip套件。

解壓縮到目錄,開啟dbx4_bde_wrapper.dproj,先build,然後install。

 

打開目錄中的dbxdrivers.ini,複製下列文字

DBX4BDE=1

[DBX4BDE]
DelegateDriver=False
DriverName=DBX4BDE
DriverUnit=dbx4_bde_wrapper_unit
DriverPackageLoader=TDBX4BDEDriverLoader
DriverPackage=dbx4_bde_wrapper.bpl
Database=DBDEMOS

加到到C:\Documents and Settings\user\My Documents\RAD Studio\dbExpress\的dbxdrivers.ini檔中。

作法:

1. 打開或新增專案,放上BDE的TDatabase元件,設定好參數,name=myDemos。

2. 放上dbExpress的TSQLConnection元件,Edit Connection Properties,Add Connection。

3. Driver Name = DBX4BDE,Connection Name 自行命名。

4. Connection Setting的Database = myDemos。

5. 按Test Connection,Successfully Connectioned。

完成。

 

Demo Video參考連結:http://www.bluetrainsoftware.com/developersinc/DBXBDEDemo/dbx_bde_project.html

2007年11月23日 星期五

如何在Data Explorer建立Blackfishsql新資料庫?

如何在新DBX_DEMO_JDS connection建立bfdmeo.JDS:

打開Data Explorer, 選擇dbExpress | BlackfishSql | 右鍵 | Add New Connection

輸入 connection name, 例如: "dbx_demo_jds" 按 "Ok"

在這新的 connection 按右鍵, 選擇 "Modify Connection"

打開Connection對話方塊

輸入新的database參數:

  • the server name : localhost
  • the database name: 資料庫完整路徑名稱, 例:

      C:\programs\us\db\blackfishsql\data\bfdemo.jds

  • the user name : SYSDBA
  • the password : masterkey


按 "Advanced" 按鈕打開進階參數設定, 將 "Create" 設成 True:

按 "Ok"

按 "Test Connection"

顯示 "Connection Succeeds" 
按 "Ok"
新的database 成功建立完成.

2007年11月12日 星期一

Delphi Vcl for Web(intraweb)由StandAlone改為ISAPI

2007年11月9日 星期五

Delphi中建議使用的寫法

計算你的網站排放了多少二氧化碳

根據統計,每年光是網際網路就排放了 1000 億磅的二氧化碳,所以哈佛和耶魯的學生做出了可以計算網站二氧化碳排放量的免費 widget,雖然不知道它是怎麼算出來的,不過蠻有趣,而且又有環保概念,所以快去把官網或下面的程式碼貼在你的網站上,看看你的網站是不是綠色網站。

<a href=http://www.co2stats.com/?rs=4850><img src=http://www.co2stats.com/widget.php?s=4850 border="0"></a>