Tạo MDE bị lỗi!

  • Thread starter khanhtrang1512
  • Ngày gửi
K

khanhtrang1512

Guest
27/4/06
10
0
0
87 Phan Chu Trinh
Tôi đang viết 1 chương trình Access, nhưng khi biên dịch sang MDE lại bị lỗi: "This error is usually associated with compiling a large database into an MDE file.  Due to the method used to compile the database, a considerable number of TableID references are created for each table.  The Microsoft Jet database engine version 4.0 can only create a maximum of 2048 open TableIDs at one time.  Exporting a database as an MDE potentially can exceed this limit if the database has a large number of objects (table, macro, form, report, etc).
There is no accurate method to estimate the number of TableIDs the Jet database engine uses during the process of compiling a database as an MDE.  However, each VBA module and each form uses one TableID, as a result, if the database has 500 forms, and each form's HasModule property is set to Yes, as many as 1,000 TableIDs are used."
Ai chỉ cho tôi lỗi này với. Cảm ơn nhiều
 
Khóa học Quản trị dòng tiền
L

lehongduc

Trung cấp
29/3/05
131
1
18
64
VietNam
Khắc phục lỗi biên dịch MDB sang MDE

khanhtrang1512 nói:
Tôi đang viết 1 chương trình Access, nhưng khi biên dịch sang MDE lại bị lỗi: "This error is usually associated with compiling a large database into an MDE file. Due to the method used to compile the database, a considerable number of TableID references are created for each table. The Microsoft Jet database engine version 4.0 can only create a maximum of 2048 open TableIDs at one time. Exporting a database as an MDE potentially can exceed this limit if the database has a large number of objects (table, macro, form, report, etc).
There is no accurate method to estimate the number of TableIDs the Jet database engine uses during the process of compiling a database as an MDE. However, each VBA module and each form uses one TableID, as a result, if the database has 500 forms, and each form's HasModule property is set to Yes, as many as 1,000 TableIDs are used."
Ai chỉ cho tôi lỗi này với. Cảm ơn nhiều
Xin chào Bạn,
Chẩn bệnh: có thể bạn đã để cho cái file mdb của bạn nó nở quá to rồi.
Tiên liệu: sẽ hỏng luôn nếu còn tiếp tục open mà không trị bệnh này.
Bốc thuốc:
Trước khi làm những việc sau xin chép lưu file mdb sang 1 nơi an toàn, để lỡ có việc chi còn có cái mà xài, kẻo hối hận.
1. Khởi động MS. Access
2. Từ menu Tools chọn Database Utilities => chọn tiếp Compact and Repair Database ... => chỉ vào file mdb đang xử lý
3. Sau đó mở file mdb ở chế độ an toàn: bấm và giữ phím Shift khi open.
4. Cho tách các tables ra khỏi file mdb thành 1 file độc lập => sau đó xóa tất cả các tables. Từ đây gọi file mdb đã xóa hết các tables là "file mdb ứng dụng" và file mdb chứa các tables mới tách ra là "file mdb dữ liệu"
5. Trong file mdb ứng dụng Viết 1 tiện ích cho link các tables từ file mdb dữ liệu sang mỗi khi nạp file mdb ứng dụng.
Hoàn tất xong là bạn có thể thoải mái biên dịch file mdb ứng dụng sang mde rồi.
Chúc sức khỏe.
 
K

khanhtrang1512

Guest
27/4/06
10
0
0
87 Phan Chu Trinh
Anh LHĐ vui lòng chỉ giáo thêm về cách tạo link này đi. Nếu có thể thì cho em xin 1 ví dụ nho nhỏ gọi là.. Cảm ơn nhiều
 
L

lehongduc

Trung cấp
29/3/05
131
1
18
64
VietNam
T

tamrua

Guest
17/11/09
1
0
0
Tp.HCM
Hix... link die rồi/.... làm ơn chỉ dùm tamrua cách làm với lehongduc oi :(:(
 
T

tung1999

Sơ cấp
9/2/09
41
0
0
can gio
Tôi đang viết 1 chương trình Access, nhưng khi biên dịch sang MDE lại bị lỗi: "This error is usually associated with compiling a large database into an MDE file.  Due to the method used to compile the database, a considerable number of TableID references are created for each table.  The Microsoft Jet database engine version 4.0 can only create a maximum of 2048 open TableIDs at one time.  Exporting a database as an MDE potentially can exceed this limit if the database has a large number of objects (table, macro, form, report, etc).
There is no accurate method to estimate the number of TableIDs the Jet database engine uses during the process of compiling a database as an MDE.  However, each VBA module and each form uses one TableID, as a result, if the database has 500 forms, and each form's HasModule property is set to Yes, as many as 1,000 TableIDs are used."
Ai chỉ cho tôi lỗi này với. Cảm ơn nhiều
Chào bạn.
Theo mình nghĩ quá trình thiết kế form, report của bạn đã có xoá sửa rất nhiều, từ đó còn tồn tại một số code "dư"
Khắc phục lỗi nầy cũng không khó, bạn làm như sau: tại cửa sổ Database nhấn phím Alt+F11 sau đó vào menu Debug -> copile -> sẽ chỉ ra đoạn code bị lỗi, bạn xoá hết đoạn code đó, tiếp tục Debug và xoá đến khi nào hết báo lỗi thì thôi. Sau đó thực hiện chuyển MDE.
 
H

haquocquan

Trung cấp
19/4/08
68
0
6
Bắc Giang
Chào bạn.
Theo mình nghĩ quá trình thiết kế form, report của bạn đã có xoá sửa rất nhiều, từ đó còn tồn tại một số code "dư"
Khắc phục lỗi nầy cũng không khó, bạn làm như sau: tại cửa sổ Database nhấn phím Alt+F11 sau đó vào menu Debug -> copile -> sẽ chỉ ra đoạn code bị lỗi, bạn xoá hết đoạn code đó, tiếp tục Debug và xoá đến khi nào hết báo lỗi thì thôi. Sau đó thực hiện chuyển MDE.
Theo Tung1999 có hai nguyên nhân:
Một là, tròngile của bạn có quá 2048 object (kể cả object đã bị xoá)
Hai lài, các module đang có lỗi.
Để có thể chuyển sang MDE hoàn hảo, bạn xoá các module bị lỗi; đồng thời import các object sang file MDB mới (chỉ chọn các object trong MDB cũ, không dùng select all). Chắc là OK.
 

Xem nhiều

Webketoan Zalo OA