全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1543
推到 Plurk!
推到 Facebook!

請問 Delphi4 用 TDatabase 連 MySQL 無法 StartTransaction

答題得分者是:Mickey
whyzn
中階會員


發表:46
回覆:149
積分:54
註冊:2002-06-16

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-03-03 18:47:02 IP:61.223.xxx.xxx 未訂閱
請問先進 我用 Delphi4 的 TDatabase 原件連接 MySQL 資料庫(目前在本機測試) 若用 Query 作 update 沒問題 但當我想用 Database 的 transaction 交易同時去異動 兩個 table 時 一執行 Database1.StartTransaction  就會出現 raised exception class EBDEngineError with message 'Capability not supported General SQL Error [TCX][MyODBC] Transcations are not enabled' Process stopped ... 有經驗的學長們,請指導一下,Thanks a lot. ●○○○○○●○○○○○● 竹密不妨水過,山高無礙雲飛
------
●○○○○○●○○○○○●
竹密不妨水過,山高無礙雲飛
cmj
高階會員


發表:15
回覆:242
積分:226
註冊:2002-06-12

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-03-05 10:23:23 IP:211.76.xxx.xxx 未訂閱
MySQL不支援交易看新版是否有改善或換資料庫.
Mickey
版主


發表:77
回覆:1882
積分:1390
註冊:2002-12-11

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-03-05 11:19:18 IP:61.219.xxx.xxx 未訂閱
你必須 Turn On MySQL innoDB support, My.ini 參考如下:
#This File was made using the WinMySQLAdmin 1.4 Tool
#2002/10/30 下午 04:00:26    #Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions    [mysqld]
basedir=C:/mysql
#bind-address=192.15.1.217
datadir=E:/mysdata
#language=C:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
# You can write your other MySQL server options here
# ...
innodb_data_home_dir =
# Data files must be able to
# hold your data and indexes
innodb_data_file_path = E:/MysData/ibdata/ibdata1:10M:autoextend
# Set buffer pool size to
# 50 - 80 % of your computer's
# memory, but make sure on Linux
# x86 total memory usage is
# < 2 GB
set-variable = innodb_buffer_pool_size=1G
set-variable = innodb_additional_mem_pool_size=20M
innodb_log_group_home_dir = E:/MysData/iblogs
# .._log_arch_dir must be the same
# as .._log_group_home_dir
innodb_log_arch_dir = E:/MysData/iblogs
set-variable = innodb_log_files_in_group=3
# Set the log file size to about
# 15 % of the buffer pool size
set-variable = innodb_log_file_size=150M
set-variable = innodb_log_buffer_size=8M
# Set ..flush_log_at_trx_commit to
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
user=Administrator
password=mick
/* Free 和 Create 一樣重要 */
whyzn
中階會員


發表:46
回覆:149
積分:54
註冊:2002-06-16

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-03-05 23:21:02 IP:61.223.xxx.xxx 未訂閱
感謝 cmj 和 Mickey 我的 my.ini 內容如下 紅色部分是我加上去的,不過問題仍在 不知哪裡還要修正 ? #This File was made using the Winmysqladmin 1.0 Tool #2000/10/7 AM 12:49:50 #Uncomment or Add only the keys that you know how works. #Read the MySQL Manual for instructions [mysqld] basedir=C:/APACHE/MYSQL #bind-address=127.0.0.1 datadir=c:/APACHE/mysql/data #language=c:/apache/mysql/share/your language directory #delay-key-write-for-all-tables #log-long-format #slow query log=# #tmpdir=# #ansi #new #port=3306 #safe #skip-name-resolve #skip-networking #skip-new #skip-host-cache #set-variable=key_buffer=16M #set-variable=max_allowed_packet=1M #set-variable=thread_stack=128K #set-variable=flush_time=1800 innodb_data_home_dir = # Data files must be able to # hold your data and indexes innodb_data_file_path =c:/APACHE/mysql/data:10M:autoextend # Set buffer pool size to # 50 - 80 % of your computer's # memory, but make sure on Linux # x86 total memory usage is # < 2 GB set-variable = innodb_buffer_pool_size=1G set-variable = innodb_additional_mem_pool_size=20M innodb_log_group_home_dir =c:/APACHE/mysql/data/iblogs # .._log_arch_dir must be the same # as .._log_group_home_dir innodb_log_arch_dir = c:/APACHE/mysql/data/iblogs set-variable = innodb_log_files_in_group=3 # Set the log file size to about # 15 % of the buffer pool size set-variable = innodb_log_file_size=150M set-variable = innodb_log_buffer_size=8M # Set ..flush_log_at_trx_commit to [mysqldump] #quick #set-variable=max_allowed_packet=16M [mysql] #no-auto-rehash [isamchk] #set-variable=key=16M [Winmysqladmin] Server=C:/APACHE/MYSQL/bin/mysqld.exe user=root password= ●○○○○○●○○○○○● 竹密不妨水過,山高無礙雲飛
------
●○○○○○●○○○○○●
竹密不妨水過,山高無礙雲飛
bookworm
中階會員


發表:63
回覆:161
積分:82
註冊:2002-08-03

發送簡訊給我
#5 引用回覆 回覆 發表時間:2003-03-05 23:28:02 IP:211.76.xxx.xxx 未訂閱
4.1版支援transactions,不過還沒試過,你可以去他們的網站下載alpha版 ======================= 二星級新手,問基礎問題請勿見笑 ^^
Mickey
版主


發表:77
回覆:1882
積分:1390
註冊:2002-12-11

發送簡訊給我
#6 引用回覆 回覆 發表時間:2003-03-06 08:30:59 IP:61.219.xxx.xxx 未訂閱
引言: 我的 my.ini 內容如下 紅色部分是我加上去的,不過問題仍在 不知哪裡還要修正 ? innodb_data_home_dir = # Data files must be able to # hold your data and indexes innodb_data_file_path =c:/APACHE/mysql/data:10M:autoextend # Set buffer pool size to # 50 - 80 % of your computer's # memory, but make sure on Linux # x86 total memory usage is # < 2 GB set-variable = innodb_buffer_pool_size=1G set-variable = innodb_additional_mem_pool_size=20M innodb_log_group_home_dir =c:/APACHE/mysql/data/iblogs # .._log_arch_dir must be the same # as .._log_group_home_dir innodb_log_arch_dir = c:/APACHE/mysql/data/iblogs set-variable = innodb_log_files_in_group=3 # Set the log file size to about # 15 % of the buffer pool size set-variable = innodb_log_file_size=150M set-variable = innodb_log_buffer_size=8M # Set ..flush_log_at_trx_commit to
1. c:/APACHE/mysql/data
   c:/APACHE/mysql/data/iblogs
必須先 create 好.
2. MySQL Manual for reference:
http://delphi.ktop.com.tw/topic.php?TOPIC_ID=26786
/* Free 和 Create 一樣重要 */
whyzn
中階會員


發表:46
回覆:149
積分:54
註冊:2002-06-16

發送簡訊給我
#7 引用回覆 回覆 發表時間:2003-03-06 11:45:59 IP:61.223.xxx.xxx 未訂閱
感謝 Mr. Mickey 您上傳的 MySQL Manual referance 好像沒傳成功喔 也在此感謝 Mr. bookworm 我會去官方網站看看 ●○○○○○●○○○○○● 竹密不妨水過,山高無礙雲飛
------
●○○○○○●○○○○○●
竹密不妨水過,山高無礙雲飛
Mickey
版主


發表:77
回覆:1882
積分:1390
註冊:2002-12-11

發送簡訊給我
#8 引用回覆 回覆 發表時間:2003-03-06 15:31:17 IP:61.219.xxx.xxx 未訂閱
引言: 感謝 Mr. Mickey 您上傳的 MySQL Manual referance 好像沒傳成功喔 也在此感謝 Mr. bookworm 我會去官方網站看看 ●○○○○○●○○○○○● 竹密不妨水過,山高無礙雲飛
抱歉 ! 不知為何 File po 不上,請到 http://www.mysql.com/documentation/index.html /* Free 和 Create 一樣重要 */
whyzn
中階會員


發表:46
回覆:149
積分:54
註冊:2002-06-16

發送簡訊給我
#9 引用回覆 回覆 發表時間:2003-03-06 21:12:01 IP:61.223.xxx.xxx 未訂閱
我發覺若加入 inno....這些東西 innodb_data_home_dir=c:/APACHE/mysql/data innodb_data_file_path =c:/APACHE/mysql/data:10M:autoextend set-variable = innodb_buffer_pool_size=1G set-variable = innodb_additional_mem_pool_size=20M innodb_log_group_home_dir =c:/APACHE/mysql/data/iblogs innodb_log_arch_dir = c:/APACHE/mysql/data/iblogs set-variable = innodb_log_files_in_group=3 set-variable = innodb_log_file_size=150M set-variable = innodb_log_buffer_size=8M 則 mysqld 就會啟動失敗 ●○○○○○●○○○○○● 竹密不妨水過,山高無礙雲飛
------
●○○○○○●○○○○○●
竹密不妨水過,山高無礙雲飛
Mickey
版主


發表:77
回覆:1882
積分:1390
註冊:2002-12-11

發送簡訊給我
#10 引用回覆 回覆 發表時間:2003-03-07 08:33:36 IP:61.219.xxx.xxx 未訂閱
抱歉, 實在是我也記不起來當初如何安裝 MySQL, 以下擷取自 MySQL Manual Section 2.1.2.3 :
Testing from a DOS command prompt is the best thing to do because the server displays
status messages that appear in the DOS window. If something is wrong with your congu-
ration, these messages will make it easier for you to identify and x any problems.
Make sure you are in the directory where the server is located, then enter this command:
C:\mysql\bin> mysqld-max --standalone
You should see the following messages as the server starts up:
InnoDB: The first specified datafile c:\ibdata\ibdata1 did not exist:
InnoDB: a new database to be created!
InnoDB: Setting file c:\ibdata\ibdata1 size to 209715200
InnoDB: Database physically writes the file full: wait...
InnoDB: Log file c:\iblogs\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file c:\iblogs\ib_logfile0 size to 31457280
InnoDB: Log file c:\iblogs\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file c:\iblogs\ib_logfile1 size to 31457280
InnoDB: Log file c:\iblogs\ib_logfile2 did not exist: new to be created
InnoDB: Setting log file c:\iblogs\ib_logfile2 size to 31457280
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: creating foreign key constraint system tables
InnoDB: foreign key constraint system tables created
011024 10:58:25 InnoDB: Started
/* Free 和 Create 一樣重要 */
whyzn
中階會員


發表:46
回覆:149
積分:54
註冊:2002-06-16

發送簡訊給我
#11 引用回覆 回覆 發表時間:2003-03-07 15:01:58 IP:61.223.xxx.xxx 未訂閱
我的版本 4.23 竟然沒有 mysqld-max.exe 應該如 Mr. cmj and bookworm 所言,要較新的版本才支援 Transaction 我在官方網站上看到的是 3.23.38 以後就有了說..... 後來我改裝 4.0.11a 已經可以了 非常謝謝大家指引, 本站的給分方式讓我為難了 因為只能一位得分,所以只好打給幫我解決問題最接近的仁兄了 其他學長不介意吧  ●○○○○○●○○○○○● 竹密不妨水過,山高無礙雲飛 發表人 -
------
●○○○○○●○○○○○●
竹密不妨水過,山高無礙雲飛
系統時間:2024-07-01 20:18:26
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!