<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>面膜哥的Blog &#187; Dephi</title>
	<atom:link href="http://chihping.aflypen.com/category/learn/delphi/feed" rel="self" type="application/rss+xml" />
	<link>http://chihping.aflypen.com</link>
	<description>記錄面膜哥對人事物的看法</description>
	<lastBuildDate>Fri, 10 Feb 2012 15:25:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>使用UniDAC讀取Mysql資料庫</title>
		<link>http://chihping.aflypen.com/1652.html</link>
		<comments>http://chihping.aflypen.com/1652.html#comments</comments>
		<pubDate>Sat, 25 Jul 2009 03:53:37 +0000</pubDate>
		<dc:creator>面膜哥</dc:creator>
				<category><![CDATA[Dephi]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[unidac]]></category>

		<guid isPermaLink="false">http://chihping.aflypen.com/1652.html</guid>
		<description><![CDATA[之前測試過，使用Mysql元件來讀資料，但是失敗，失敗的原因是什麼目前還不知道。所以用了另一套元件(控件)來存取MySQL的資料。 通常來說，要讀取某一筆特定的資料，select的語法如下 select * from tabls where filed1=&#8217;abc&#8217; AND field2 =&#8217;DEF&#8217;; 在php和一般SQL的指令是這麼下的沒有錯 但是，在Delphi的UniDAC卻不是如此 要使用UniQuery的Fileter屬性來撈我們要的資料 Step1 取得輸入的資料 useri:=edit1.Text; passi:=edit2.Text; Step2 開啟UniQuery的Filter功能 UniQuery1.Filtered:=true; Step3 組合我們要的FilterSQL語法 filtertext1:=&#8217;USER="&#8216;+useri+"&#8216;AND Pass="&#8216;+passi+""; Step4 把語法指定給 Uniquery1.FilterSQL Uniquery1.FilterSQL:=filtertext1; Step5 開啟UniQuery UniQuery1.open; 這個時候，就可以查到我們要的資料了 說真的，網路上在討論 UniQuery的人不多，因為我想說UniDAC和MyDAC都是devart公司出來，UniQuery提供了多種database的查詢，而MyDAC只是其中的一種，所以MyDAC能用的方法，UniDAC也一樣，所以參考了MyQuery的語法進行測試，最後才測試成功。語法怪的地方在於引號的部份，為什麼要用2次的引號，我就不知道了，不過使用UniDAC來查Mysql，真的花了我很多的時間測試，等一下來測試看看新增修改和刪除的功能。]]></description>
		<wfw:commentRss>http://chihping.aflypen.com/1652.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Delphi函數</title>
		<link>http://chihping.aflypen.com/1633.html</link>
		<comments>http://chihping.aflypen.com/1633.html#comments</comments>
		<pubDate>Mon, 20 Jul 2009 15:18:22 +0000</pubDate>
		<dc:creator>面膜哥</dc:creator>
				<category><![CDATA[Dephi]]></category>

		<guid isPermaLink="false">http://chihping.aflypen.com/1633.html</guid>
		<description><![CDATA[數學函數 (Arithmetic Routines) Unit: System ====================================================================== Abs 傳回參數的絕對值。 function Abs(X); ArcTan 傳回正切函數的反函數值。 function ArcTan(X: Real): Real; Cos 傳回餘弦函數值 function Cos(X: Real): Real; (X 以弧度為單位)。 Exp 傳回自然指數值。 function Cos(X: Real): Real; Frac 傳回參數的小數部份。 function Frac(X: Real): Real; Int 傳回參數的整數部份。 function Int(X: &#8230; <a href="http://chihping.aflypen.com/1633.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://chihping.aflypen.com/1633.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi的數字類資料型態&amp;函數</title>
		<link>http://chihping.aflypen.com/1627.html</link>
		<comments>http://chihping.aflypen.com/1627.html#comments</comments>
		<pubDate>Sun, 19 Jul 2009 09:56:53 +0000</pubDate>
		<dc:creator>面膜哥</dc:creator>
				<category><![CDATA[Dephi]]></category>

		<guid isPermaLink="false">http://chihping.aflypen.com/1627.html</guid>
		<description><![CDATA[數字類的資料型態 Type Storage size Range Byte 1 0 to 255 ShortInt 1 -127 to 127 Word 2 0 to 65,535 SmallInt 2 -32,768 to 32,767 LongWord 4 0 to 4,294,967,295 Cardinal 4* 0 to 4,294,967,295 LongInt 4 -2,147,483,648 to 2,147,483,647 &#8230; <a href="http://chihping.aflypen.com/1627.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://chihping.aflypen.com/1627.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi的If&#8230;then..Else</title>
		<link>http://chihping.aflypen.com/1626.html</link>
		<comments>http://chihping.aflypen.com/1626.html#comments</comments>
		<pubDate>Sun, 19 Jul 2009 01:18:53 +0000</pubDate>
		<dc:creator>面膜哥</dc:creator>
				<category><![CDATA[Dephi]]></category>
		<category><![CDATA[語法]]></category>

		<guid isPermaLink="false">http://chihping.aflypen.com/1626.html</guid>
		<description><![CDATA[在條件事選擇的時候，通常可以用幾種選擇性結構進行判斷 在php中 if 條件式是這麼下的 if (a!=0){ 做什麼事;}else{ 做另一件事; } 如此一來，完成一個選擇性的結構 在delphi中，法語有一些些的不同，在if..than&#8230;else的結構中，不能放;(if條件句結束)，如果要放;，只能加在begin&#8230;end中 下面是做按鈕的開關sample If Edit1.Text=" Then Button1.Enable:=false Else Button1.Enable:=true; &#60;&#8212;最後要加分號做結束 多內容的If&#8230;Then&#8230;Else語法 If Edit1.Text=" Then begin Button1.Enable:=false; Button2.Enable:=false; Button3.Enable:=false; end &#60;&#8212;第1個End 不加 ; 最後一個End 才加; Else begin Button1.Enable:=true; Button2.Enable:=true; Button3.Enable:=true; end ;]]></description>
		<wfw:commentRss>http://chihping.aflypen.com/1626.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi的資料庫連接</title>
		<link>http://chihping.aflypen.com/1611.html</link>
		<comments>http://chihping.aflypen.com/1611.html#comments</comments>
		<pubDate>Sat, 18 Jul 2009 07:17:46 +0000</pubDate>
		<dc:creator>面膜哥</dc:creator>
				<category><![CDATA[Dephi]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracel]]></category>
		<category><![CDATA[破解]]></category>

		<guid isPermaLink="false">http://chihping.aflypen.com/1611.html</guid>
		<description><![CDATA[1.dbexpress 2.ado 3.myodbc 4.3rd party object(Tmysql/zeros/MyDAC) Tmysql http://www.productivity.org/projects/tmysql/ 看了介紹，Tmysql沒有使用TDatabase TQuery等，也不是使用BDE/ODBC 最後的版本在2002年的2月12日發佈 我用的是 Delhpi And C++ Builder 2009版的，不知道有沒有支援。 TDatabase是使用BDE(Borland Database Engine) TQuery則是要設定ODBC資料來源(回想起當初出社會時，安裝軟體設定ODBC的痛苦) MyDAC元件在網站是這麼介紹的 MySQL Data Aceess Componets，提供的物件蠻多的，請參考下圖 下載頁在這裡，有免費版的可以下載 http://www.devart.com/mydac/download.html 重點是，有支援Delphi and C++ Builder 2009 而且，還有支援其他多種DB的連線 Oracle SQL Server InterBase Firebird PostgreSQK &#8230; <a href="http://chihping.aflypen.com/1611.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://chihping.aflypen.com/1611.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi的變數轉型</title>
		<link>http://chihping.aflypen.com/1610.html</link>
		<comments>http://chihping.aflypen.com/1610.html#comments</comments>
		<pubDate>Sat, 18 Jul 2009 07:04:12 +0000</pubDate>
		<dc:creator>面膜哥</dc:creator>
				<category><![CDATA[Dephi]]></category>

		<guid isPermaLink="false">http://chihping.aflypen.com/1610.html</guid>
		<description><![CDATA[因為，在php裡面，所有的變數都是自動轉型的，數字和字串都很好操作，也不會出錯，但是在直譯時，就是要犧牲部份的效率(其實感覺不太出來)。 VB和Delphi都要對變數的種類進行指定，而且，操作時，需要自己選擇轉型(網路上有看到別人寫，delphi也可以自動對變數進行轉型，但是不知道怎麼做)。 沒有關係，就照正統的方式來做吧！ 整數變字串 inttostr(); 字串變整數 strtoint(); ex: inttostr(3)=&#8217;3&#8242;，strtoint(&#8217;3&#8242;)=3 相似的轉型涵數還有 floattostr(); strtofloat();]]></description>
		<wfw:commentRss>http://chihping.aflypen.com/1610.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi再一次親密接觸</title>
		<link>http://chihping.aflypen.com/1608.html</link>
		<comments>http://chihping.aflypen.com/1608.html#comments</comments>
		<pubDate>Sat, 18 Jul 2009 06:39:49 +0000</pubDate>
		<dc:creator>面膜哥</dc:creator>
				<category><![CDATA[Dephi]]></category>

		<guid isPermaLink="false">http://chihping.aflypen.com/1608.html</guid>
		<description><![CDATA[其實，很久之前就想學Delphi了，因為之前自己有玩過VB，還寫了一個小的庫存管理程式，不過因為後來工作的內容都在玩硬體，也就沒有有再寫VB。 Delphi第一次是在9年前，工作的關係，有一個工程師用Delphi，他說操作和開發起來比VB還要快，而且很結構化，容易學習；當然，這是他個人的感受，因為那時玩了一陣子VB，也就沒有花太多的心力去學Delphi。 Delphi，是一種從Pascal(巴斯卡)演變而來的語言，後期的工具加入了視窗和物件導向的功能，讓使用者在Windows上可以很容易開發程式，當然，有一陣子推了一套Kylix系統，就是Delphi的linux版，設計師可以在很少的修改下，就可以在linux上開發出一樣功能的軟體或系統，當然，後來，就不了了之。 因為工作的關係，在三年多前，開始使用php+mysql來開發一些系統，不論是工作上，還是自己架的網站，因為Web Base的關係，使用者的學習曲線變直了，容易上手，但是單機版上跑Php，還是限制很多，光是環境和資料庫，應該就會吃了不少的資源。當然，Delphi運作模式是不同的，假設是三層式的架構，不用經過apache，自然，資源會少一點，但是資料庫的部份，可能就不一定了。 為什麼回來玩delphi呢？因為工作效率的關係，之前架設的網站，大多是使用hosting的方式，如果所有程式都在上面開發，很容易就把DB的存取次數用完(有幾個hosting service provider只可以在每小數中存取20000次)，而且，也受限於網路傳輸的速度，如果可以在單機上跑，光個Access，可能就很夠用了，那個執行效率，自然就不用比了。 基本上，delphi程式運算的效能，只是吃單機上的資源(程式,dll)，再對DB做access，分散在各Client的運算率能，就可以增加整體工作的效率，降低server建置的成本，一個個人電腦建構的db server，應該就足夠了，除了以上理由，另外delphi連接周邊配備的能力也比php強上許多，對於資料的收集以及分析，我想，這是我著眼的。 至於為什麼不回來用vb/vb.net呢？visual c++/c#/java這些語言也很不錯啊！我想，我的骨子裡是個反微軟的傢伙，能不用微軟的，就不用微軟的；網路上一堆人在講power build和delphi的支持與擁戴，其實當初我也想了很久，要用delphi還是power builder，反正解決方案這麼多，delphi都推25年了，基本的pascal語言，沒有太多的改變，假如，每3年5年，就要學新一種的開發環境，有一天，我會老，學的速度不如年輕人的時候，我還剩下些什麼？至於我的論點是不是對的呢？留給時間去解答。]]></description>
		<wfw:commentRss>http://chihping.aflypen.com/1608.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

