DATABASE:
1/ Mở Microsoft Access.Click nút New sau đó click chọn mục Blank Database...
2/ Trong mục "Save in" hãy chọn thư mục "YotShop" trên Desktop của bạn. Trong hộp "File name" đánh vào tên Database mới là "YotShop.mdb". Click nút "Create".
3/ Chọn "Tables" , double click vào "Create table in design view" .
4/ Tạo các Field trong Database như sau:
ysID = AutoNumber (primary key)
design = Text
year = Text
price = Number
construction = Text
laying = Text
brief_description = Memo
full_description = Memo
int_description = Memo
pic_thumb = Text
pic_ext = Text
pic_int = Text
5/ Mặc định trường Text cho phép 50 ký tự.Bạn có thể đặt trường Text tối đa lưu trữ 255 ký tự. Click chọn Field design và thay đổi "50" thành "100" trong Field Size của "General" panel.
Tại mục Allow Zero Length hãy chọn là Yes từ menu.
Hạy lập lại mục Allow Zero Length cho tất cả các trường "Text" và "Memo" trong database của bạn.
+ Trường Text có thể lưu giữ 255 ký tự. Trường Memo có thể lưu trữ đến 32,000 ký tự .
6/ Chọn trường price và chọn Long Integer trong Field size của General .
+ Long Integer cho phép lưu trữ số từ -2,147,438,648 đến 2,147,438,647 .Integer cho phép lưu trữ số từ -32,768 và 32,767. Byte cho phép lưu trữ số từ 0 và 255.
Hãy click chọn YotStock và chọn "Design View" từ menu như sau:
9/ Mở tập tin YotShopText.txt trong thư mục YotShop trên Desktop. Bạn sẽ thấy các văn bản cho thuyền "YACHT 1". Hãy Copy và paste các thông tin này vào các trường tương ứng.
-
Copy Design và dán vào trường design
-
Copy Year và dán vào trường year
-
Copy Price và dán vào trường price
-
Copy Construction và dán vào trường construction
-
Copy Laying và dán vào trường laying
-
Copy Brief Description và dán vào trường brief_description
-
Copy Full Descriptionvà dán vào trường full_description
-
Copy Interior Description và dán vào trường int_description
-
Copy Thumbnail và dán vào trường pic_thumb
-
Copy Exterior và dán vào trường pic_ext
-
Copy Interior và dán vào trường pic_int
YACHT 1...
Design: Roberts 43
------
Brief Description:
The Roberts 43 is an ocean-going cruising yacht, this particular example being professionally built to a high standard, with extensive use of stainless steel in areas where wear and tear is expected. She has internal watertight collision bulkheads.
---------------------
Full Description:
She is constructed of 6mm steel below the waterline, 5mm on the topsides, and 3mm on deck, with extensive use of stainless steel in way of attachments for fittings, wear points, etc. She was surveyed for insurance purposes on completion, the survey report stating that "the steel plating had been expertly faired and filled, welds ground smooth, and well coated." The open-backed pilot house is fabricated entirely of stainless steel, and is arranged so that sheet winches can be handled from within the shelter. The entire foredeck around the anchor windlass is also stainless. Internally, she has two full watertight collision bulkheads.
--------------------
Interior Description:
The accommodation consists of a large double berth cabin aft, accessed via an internal walk-through passageway from the saloon, with an en-suite heads compartment with WC, basin and shower. In the saloon the chart table and U-shaped saloon table and seating are to port, with galley and another settee and pilot berth to starboard. Forward of this is a second heads, also with basin and shower, extensive locker and hanging space, and a forecabin with vee-berth.
-------------------
Year: 1996/7
Laying: Devon
Construction: Steel
Price: 85,000
------------------
Picture Paths ...
Thumbnail: stock/01roberts_thmb.jpg
Exterior: stock/01roberts_ext.jpg
Interior: stock/01roberts_int.jpg
10/ Database sẽ như sau:
11/ Copy thư mục "YotShop" trên Desktop vào thư mục "wwwroot" trên máy chủ của bạn.
CẤU HÌNH DSN (Data Source Name)
12/ Để cấu hình "DSN". Hãy mở "Control Panel" và double click vào biểu tượng "ODBC Data Sources" (bạn đang sử dụng Windows 98) . Nếu bạn xử dụng Windows XP Profesional khi bạn đang ở trong cửa sổ "Control Panel" hãy dbclick để mở Administrative Tool sau đó mới dbclick vào "ODBC Data Sources"
13/ Hãy chọn Tab "System DSN" và click nút "Add".
14/ Hãy chọn Tab "System DSN" và click nút "Add".
15/ Cửa sổ "ODBC Microsoft Access Setup" sẽ mở ra.
-
Trong hộp "Data Source Name" nhập YotShop. Đây là tên mà chúng ta sẽ sử dụng sau này khi tạo kết nối DSN.
-
Click nút "Select" cửa sổ "Select Database" sẽ mở ra.
-
Double click vào "D:\" và browse tới thư mục "YotShop" trong thư mục "wwwroot".
-
Click chọn "YotShop.mdb" và click nút "OK" .
-
Trong cửa sổ "ODBC Microsoft Access Setup" click nút "OK" .
16/ Browse đến tập tin "YotShop.mdb" trong D:\inetpub\wwwroot\YotShop. Click OK.
17/ Click "OK" để đóng cửa sổ này lại. |