請問 Delphi4 用 TDatabase 連 MySQL 無法 StartTransaction |
答題得分者是:Mickey
|
whyzn
中階會員 發表:46 回覆:149 積分:54 註冊:2002-06-16 發送簡訊給我 |
請問先進
我用 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 發送簡訊給我 |
|
Mickey
版主 發表:77 回覆:1882 積分:1390 註冊:2002-12-11 發送簡訊給我 |
你必須 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 發送簡訊給我 |
感謝 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 發送簡訊給我 |
|
Mickey
版主 發表:77 回覆:1882 積分:1390 註冊:2002-12-11 發送簡訊給我 |
引言: 我的 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 發送簡訊給我 |
|
Mickey
版主 發表:77 回覆:1882 積分:1390 註冊:2002-12-11 發送簡訊給我 |
|
whyzn
中階會員 發表:46 回覆:149 積分:54 註冊:2002-06-16 發送簡訊給我 |
我發覺若加入 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 發送簡訊給我 |
抱歉, 實在是我也記不起來當初如何安裝 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 發送簡訊給我 |
我的版本 4.23 竟然沒有 mysqld-max.exe
應該如 Mr. cmj and bookworm 所言,要較新的版本才支援 Transaction
我在官方網站上看到的是 3.23.38 以後就有了說.....
後來我改裝 4.0.11a 已經可以了
非常謝謝大家指引, 本站的給分方式讓我為難了
因為只能一位得分,所以只好打給幫我解決問題最接近的仁兄了
其他學長不介意吧 ●○○○○○●○○○○○●
竹密不妨水過,山高無礙雲飛 發表人 -
------
●○○○○○●○○○○○● 竹密不妨水過,山高無礙雲飛 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |