Upload
victor-dodon
View
171
Download
5
Embed Size (px)
Citation preview
Microsoft
SQL, VBA
SQL Server
Microsoft
-
-
2004
681.3.06 32.973.26-018.2
42 . ., . .
42 Microsoft Access 2003. - .: -, 2004. -752 .: .
ISBN 5-94157-405-3
-
. -
, , , ,
,
Visual Basic . -,
. .
Microsoft SQL Server , Web- .
-
-
.
681.3.06 32.973.26-018.2
:
.
.
.
No 02429 or 24.07.00. 23.07.04. '. . . . . 60,63,
5000 . Na 835"-". 190005, -, ., 29.
, NB 77.99.02.953..001537.03.02 13.03.2002 . .
" "
190005, -, ., 29.
ISBN 5-941 57-405-3 . ., . ., 2004 , "-", 2004
II
I. MICROSOFT ACCESS 5 1. Access 7
Microsoft Access 7 7
10 11
11 14 Access 15 17 19 Access 2U 21 Access 22 27 28 29 31
Access 32 Access SQL Server 34- 35
Microsoft Access 37 Access 37 Access 38
38 39 39 43 43 43
44 Access 46
2. 5(1 50 - 52
53 5.5
IV ^
56
" " 59 71
71 73- 75
76
3. 81 Access 84 87
88 89 93
" " 941 95
101 103 " " 304
OLE 106 107 109
Access 1 1 6 " " 1 1 7
117 118
120 121
123 125
128 133
133 134
4. 137 137 139
140 141
142 143
144
144 145
146 148
150 153 154
154 155 Sum 155 Count 159 160
SQL 162 SQL 164
165 166 167 167 168 SQL 169 172 173 175
176 ...177
186 187
187 ,
189 191 193 195 197
,
198 ,
199 2(11
201 201 203 , 203
204 207
VI
5. 212 212
/ 212 214, 215
225 226 226 229
230 231 231 231
233 234
235 235 236 236 236
236
243 244 245 248
253 254 256
259 259 259 260
6. , 266
267 26S 269
272 272
273 273
VII
276 276 278
278 280 281 287 288
, 289 291 292
7. . 30(1 301
301 302
304 306
30S 309 310 310
310 314
8. 32(1 320
321 321 32'2 322
323 324 326
326 328 330
33 3 333 33 J
335 336
337 340
VIII
341 343
344 346 347 350 353
II. 359
9. Access 361 Access 363
364 365 370
370 373
, 374 375
, 376 377
377 378
379 380
10. Access SQL- 384Microsoft SQL Server 384
Microsoft SQL Server 2000 Desktop Engine 386 SQL 388 Access SQL Server ODBC 390
ODBC 391 393 393
SQL SQL- 399 SQL 400 SQL 400 SQL 402
SQL- 404 404 409
SQL- Access 411 Access SQL- 412
/
. Access Microsoft SQL Server 416 Access 2000 416 OLE DB 417 Access 419
,, 421 423 Access Microsoft SQL Server 2000Desktop Engine 425 428 Access SQL- 433
SQL- 434 .-'. 434 43') 442 448
450 451
12. 457 Web-, Access 45S Web- 459
Web- 460 Web- 460 Web- 465 Web- 466 Web- 467
Web- 469 Web- HTX/IDC 469 Web- ASP 47-!
Web- , 474 476
477 47S 479 481 481
482 482 48>J 497 502 506 507
: 507 Web- 50S
X
III. 511
13. 513
14. 518 520
-. 520 521
521 522
522 523
524 524
526 527
527 -. 528 528 529 531
532 532 533
, 535 535
536 536
537 , 537 541 544 548 551
15. Visual Basic 554 VBA 556 -. 558
Access 558 560 ADO 562
VBA 564 566
XI
568- 568- 570 VBA 571
572 572 573
574 , 575 576 577 579
580 GoTo 5 Call. 5SI If...Then...Else 581 DoLoop 583
DoCmd. 584 VBA 585
VBA 586 586 588 589 589
591 594 595 595
VBA 596 , 596 , 599 601 ,
605 607 608
609 ...613
614
615 621 624 SQL 627 628
XII
16. 638 640
640 642 643
644 648
651 Access 652 653 657
658
17. 661 661
662 662
, 662- 663
664 666 667 667
667 ..668
669 670
670 - 674
676 676- 678
679 679 681 682
684 "- " 686
686 687
688 690 692
() 694 " "
696 "" 697 ; 700
"" 701 703 - ,..., 705 "- " 708
. 70S , 708
711
1. " " 713
713 71.5 - 716
2. " " 718
718 719- 720
721
Access , -
.
, -
.
-
.
,
. -
-
.
. -
-
, . -
. ,
-
.
--
.
,
. -
.
-
- -
.
, , - . Access - -
.
, -
, -
. Access
_2
, -
,
.
: ,
,
. -
,
, .
Access - ,
.
-
Access Web-,
.
.
.
: -, ,
: , , , .
-
Access 2003 - -
, .
, -
, -
. -
"-", -
-
. Access SQL-. Access Web- - Web-; , Web- - , Web-,
.
,
VBA, .
3
Access. . -
.
, .
, -
Access, Access ,. . , -
.
, Access , Access 2003. , .
Access 2003 ,
, ,
Access Web-, .
, , -
Access - ,
, . .
.
, .
, , , -
-
Access 2003.
I
MICROSOFT ACCESS
1-^
-
Access Microsoft Access
( ) - -
.
.
. -
() , . - , .
( ) - , -
. -
,
( ), - SQL (Structured Query Language).
.
.
,
.
-
, , , .
-
.
8 I. Microsoft Access
-
.
.
-
. . , ,
,
, , -
, . .
Microsoft Access , -
,
SQL-, , . -
Access, , - . -
, : , , .
, -
MDB-, , .
Access - ,
.
, .
,
.
-
Access : ;
"3 , ,
;
;
, ,
;
1. Access
\ , ;
,
;
: , , , -
.
-
SQL, - - Microsoft Visual Basic for Applications (VBA).VBA Microsoft Visual Basic, - Visual Studio.VBA Microsoft Office: Access, Excel, FrontPage, Outlook, PowerPoint Word. , ,
VBA ( ). VBA Microsoft Office.VBA Microsoft Office, . VBA Access, - "-", Microsoft SQL Server, Oracle . - ODBC- (OpenDatabase Connectivity ) (Component Object Model), - OLE DB. VBA OLE DB - ActiveX (ADO). , -
Access, - Microsoft Jet. Microsoft Jet 4.0 - .
Jet 4.0 -Unicode, . Unicode , , Unicode. Microsoft Jet Microsoft SQL Server SQL SQL 92 Microsoft Jet 4.0 SQL. Access , :
"-" Access - , SQLServer.
10 I. Microsoft Access
OLE DB Microsoft Jet. -
Access -. -
Access. "-" Access .
, -
. ,
Microsoft Office Microsoft SQL Server Desktop Engine (Microsoft Data Engine, MSDE), - , Microsoft SQL Server 2000, , .
-
"-" , .
~3 - .
-
. -
Access Web- Access SQL-. Web- -
-
. Access , Access - .
Microsoft Internet Explorer 5.01 - SP2, Microsoft Internet Explorer 5. 5 .
Internet Explorer 5. 5 - -
.
Access 2003 Microsoft Office 2003 ( Professional, Professional with FrontPage, Professional Special Edition Developer). Access 2002 - Pentium III 128 RAM, -
1. Access
Windows XP . Windows XP - -
Windows; Office 2003 - ,
Office 2003. - Windows 2000 3, Windows ME, 98 NT, Microsoft Office 2003 .
, Access 2003 , Pentium 233 64 . - Office 2003 - .
Office 2003 Professional Professional SpecialEdit ion 250 , 115 , . -
. , Windows 2000/XP, 50 . -
Office .
Super VGA (800x600). 256 . - Office 2003 CD-ROM.
-
, ,
.
, ,
-
.
, -
, .
, ^
. -
12 I. Microsoft Access^
. , -
, ,
. -
, -
.
-
-
, .
.
.
, ,
. . -
.
, .
-
.
() () . .
.
.
.
.
-
.
-
~~ (1:1) --(1:). 1:1 , - . 1: , ,
.
, 1:, ,
"", . ,
"" ,
, -
. ,
. 1.1 - , 1: - ()
1. Access 13
.
, .
001002004005006
:
778957651111789889*98798456575675677
,
-
1: !,^
-
:
: ^1 1 1-1 1 1 1 1 1C .11
T1DD1001
002
111222777
555
01.01.200429.02.200414.05.200401.01 200412.01.2003
135400,00773 024,00-250 000,00
75 160,00
:
. 1.1.
.
-
.
,
. (, , .) - ,
, .
-
.
Access 2000, , - .
. -
-
.
. .
. ,
, (. 1.2), --, -
,
. I. Microsoft Access
: EBB
1
*
L*_
778957651111
+.
i
111222777
002
*
:
'
-
004005006
:
.
01.01.200429.02 200414.06.2004
789809798798
55588999
LJ!
*
1 135400,00.77 024 ,00.250000,00.
01.01.200412.01.200323.05.200412.09.2004
456575675(57777124357822587879879123
1 > ]H|t*
0,00.
75 160 ,00 1 2 000, 00 30 000, OQp.
J
450000,00..
3
-
-
,
. 1.2.
Access - . -
: ,
.
, -
- , -
.
-
,
.
, ,
,
.
, , -
, , ,
.
1. Access 75
,
, .
Access Access - mdb : , , ,
;
D , , , , - .
,
, , -
, . -
, . -
,
.
. -
, -
, . -
, Visual Basic forApplications (VBA), . , -
, .
,
VBA, . Access. .
(Tables)
. () ().
. -
.
Access 32 768 ( , . .). 2048 . dBase, FoxPro, Paradox -, "-", MicrosoftSQL Server, , Excel Lotus 1/2/3. -
16 I. Microsoft Access
,
Access. (Queries). . -
. ,
, -
.
. -
SQL - . , -
,
.
(Relationships) , ,
, -
, .
Access, .
Access | (Tools Relationships). (Forms) - . -
, -
.
.
, , , .
. -
, ,
. .
(Reports) , ,
. , -
.
.
(Data Access Pages) Web-,
, ,
.
(Macro) , - , -
. -
.
1. Access
, -
.
(Modules) Visual Basic for Applications. -, -,
, . -
,
,
.
Access .
.
Access - (shortcuts), .
,
,
(. 1.3). - .
* : - " *"
* :
2004 " : ' '
111 222 " ; "+ - + - * + , -1
", "!CD-ROM Panasonic IDE 24 16DIMM64MPC100 i " 5FDD3j5 15HDD Maxtor 20GB " , - , 8' Genius Liv ~"in 10 17LG ! 12' ]| 1 10
"
:
515
8101311
: !
' '7~.+ - .. + -.' - ; + :-' ": " "
401 1
153 11
3 3 134 4 23
12 12 23
. 1..
, ,
I. Microsoft Access
-
( ), ( , () ( ).
-
. -
, , , -
. ,
. ' -
.
, -
(. 1.4).
-
2004"""
"
CD-ROWPanasonic
IDE
DIMM 64MPCI 00 FDD 3,5
HDD Maxtor 3e K.spra 20GB Genius Liv 1TLG
'
. 1.4.
, ,
Access , , , , -
; , -
1. Access ^^^ /9
, MicrosoftInternet Explorer 5.1 SP2 . ,
,
, .
Access , SQL; Access , , SQL - .
-
OLAP (OnLine Analytic Processing), Microsoft OLAP Service SQL Server.
, Access: , ,, , , -
MDB. - .
.
Access , - .
MDE, ADE. VBA , , - , , ,
. ADE , , -
. -
| [ MDE-.
Access - , ,
. -
, , -
.
Access, , - MSDE, -, SQL-, . adp . SQL- .
20 /^ Microsoft Access
AccessAccess Microsoft Windows , -
. Access - -
. Microsoft Office, -
.
Access, Microsoft Office, , -
. (New Fi]e) , ,
(Search File) , (Clipboard) .
Access ,
. ,
. Access - .
, .
Access HTML, . -
Access, - , .
Access 2002, , .
-
.
.
. ,
,
.
(), - , Access 2003 -. Access 2003 - , - ,
-. -
1. Access
-
, , -.
, , ,
, - -
Outlook Express. - Outlook . Access -. -, Microsoft -, .
Microsoft Office 2003 Microsoft Office . - ,
Windows XP Windows Windows XP/2000. Drag and Drop - . ,
.
. -
- .
. Microsoft Access. - Access , , Microsoft Word Microsoft Excel. . -
Microsoft Excel Microsoft Access. OLE , .
Access IntelliSense, - -
-
. (OfficeAssistant) - , ,
Access.
Access -,
, SQL - Microsoft Visual Basic for Applications.
22_ I. Microsoft Access
: , -, , : , , -
, (Design). - , -
. ,
, -
.
Access , , -,
-
.
, , ,
- .
Access - .
,
, , , , , -
. ,
( ) - , . -
.
-
(Name AntoCorrect) (General), - ) (Tools|Options).
Access Access , , , ; .
(Wizard), - .
(Lookup Wizard) - -
.
(Lookup Wizard). - ] (lnsert|Lookup Column).
1. Access
-
, -
.
(Crosstab Query Wizard) - , -
, , -
-- , ,
.
-
. -
,
, -
. -.
SQL, , - .
( ). - - .
T001
17|_6 [1 000,00.
15
COJ
: M
. 1.5. ,
(Chart Wizard) - , .
. 1.5 , -
24 I. Microsoft Access/
. [ , , -
.
. -
] (ConditionalFormatting). , , , .
, -
, -
| (AutoFormat). (Command Button Wizard Page Command Button Wizard)
. -
, .
VBA. , VisualBasic, .
(Switchboard Manager) - , -
-
.
(Table Analyzer Wizard) - .
,
.
| (Tools Analyze):
(Performance), - -
-
;
(Documenter), -
Word. (PivotTable Wizard) Access 2002/2003 - , ,
.
1. Access 25
( | -| (File Get External Data|Import)) , -
.
Access, Excel, Lotus, Paradox, dBase . HTML- Microsoft Access. - , ,
XML Access, Microsoft SQL Server Microsoft SQLServer Desktop Engine. XML - Access. XML .
( | | (File Get External Data Link Tables)) , , ,
, , -
.
. ,
- . -
, : . ,
,
.
( | (File|Export)) - ( ) Access, Access, . ,
, -
. , -
Access ( - mdb), , , , Access ( adp) XML- , .
XSL. - XML , -
.
(Label Wizard) -
. -
.
26 I. Microsoft Access
(User-Level Security Wizard) .
, , -
, , -
. -
.
(Database Splitter Wizard) - , ,
, , , -
. , ,
, , , -
, ,
.
SQL Server (Upsizing Wizard) Access ( mdb) Microsoft SQLServer Access ( adp). .
SQL-, Access. . , -
, ,
. -
,
.
Microsoft SQL Server (Microsoft SQL ServerDatabase Wizard) Microsoft- Access SQL- . (Database Utilities) (ConvertDatabase) ( Access To Current Access DatabaseVersion). , ( Access To Prior AccessDatabase Version). Access 2003 Access 2000/2002 .
Microsoft Access 2002/2003 Microsoft Access 2003. Access 2003 Access 2000. - |, (Other) - Access.
1. Access 27
(Database Utilities) (Compact and Repair Database) - .
-
,
.
. , , -
Access , , .
, -
. -
.
. -
.
Access , - , , -
.
..
, -
, (New) Access, - (New file) . (Database) (. 1.6) . -
, Web- Microsoft Office, Office Online., , -
,
. .
-
, . -
, ,
Access. , - ,
, .
, , ,
. , -
26 I. Microsoft Access
, , -
, .
- i
Office Online
. 1.6.
-
, ,
Access . , -
, -
. -
.
Access \., , ,
, , -
, . ,
,
: , .
1. Access 29
,
. -
.
Access - Visual Basic forApplications (VBA) 6.4, -. VBA , - , .
VBA (,, , . .), , - . -
. -
VBA , - .
VBA : VBA, , -, , . -
Microsoft Office, VisualBasic, . Office .
, VBA, , VBA, Visual Basic - -
. VBA - Visual Basic . .
Access VBA. VBA, VBA.
Access OLE (Object Linking and Embedding ), . OLE - -
. -
30 I. Microsoft Access
, , .
- -
, .
,
. ,
.
-
Windows: , , , - . , , -
, ,
: , , ,
- . . , Access . .
Access -.
Access, dBase, Paradox, Oracle Microsoft SQL Sewer, Microsoft Excel, Lotus 1/2/3, HTML XML, , -, , Microsoft Exchange. -
.
ODBC (Open Database Connectivity), -, , , OLE DB, -
, COM. OLE DB ,
, ,
.
ODBC , Access, -. , ,
, -
Access. Microsoft SQL Server Access , - , -
.
Microsoft Jet OLE DB. -
Access. Access .
1. Access 3i
(Intranet) , "-
".
(. 1.7). - ,
, .
Internet
Access
Internet Explorer
. 1.7. SQL- Web-
Access , -, -
SQL Server. Access.
Web-, , -
. -
,
Access SQL Server.
32_ /. Microsoft Access
Access XML - XML-. , -
Web- - - XML Extensible Markup Language) XSL (ExtensibleStylesheet Language). , ,
Web, .
Access , , , -
. Access
.
, -
, . .
.
Windows 9* Windows NT/2000/XP. . -
, , Access , .
Access , - ,
.
.
,
.
-
. MicrosoftWindows NT/2000/XP NetWare Novell. Windows NT/2000/XP Windows NT/2000/XP Server, , Windows NT/2000/XP Workstation Professional, , Access.
.
, ,
, , , -
.
1. Access 33
Access - -
.
. -
-
.
-
Access , -
. Access .
(Open databases using record level locking) ( -|| - ToolsOptionsjAdvanced). - , -
.
, ,
, Access - . -
Access, . ,
, ,
. -
,
. -
Microsoft Jet .
|) (Tools]ReplicationjCreateReplica). Access .
-
. ,
,
, .
-
, -
(Synchronize Now). -
, .
' , -
(Resolve Conflicts). .
.
34 I. Microsoft Access
. -
.
Access SQL Server -
15 . -
"-". -
- ,
-
, ,
.
Access . - , ,
SQL Server (. . 1.7). , - , . -
-
SQL (Stinctured Query Language). : SQL Server Microsoft, OracleServer Oracle NetWare SQL Novell. SQL- .
Microsoft Access SQL ODBC. ODBC (Open DatabaseConnectivity) - SQL. ODBC. MS Access ODBC MS SQL Server Oracle SQL Server. SQL
. Access, Excel, FoxPro , ODBC, SQL- . Access , -, .
SQL-, - -
. -
, .
, -
SQL-cepuepa. .
1. Access __ _______ _ 35
Access -, , ,
, , SQL-. - -
(, , , -) , SQL-. Access, SQL-, -, Microsoft Jet, :;; Microsoft SQL Server OLE DB. Access OLE DB SQL Server, Access, - .
Access 2002/2003 SQL Server Microsoft SQLServer Desktop Engine { MSDE), , SQL Server, - , . -
-
. MSDE , SQLServer. MSDE SQL-. - ,
, -
SQL-.
,
SQL-. , SQL- - .
MSDE - Microsoft Office 2(]03, Microsoft Windows 98,Microsoft Windows 2000/XP . MSDE - SQL Server Service Manager. MSDE MSSQLSen/er. Start/Continue - MSDE. SQL Server Service Manager Auto-start service when OS starts.
-
-
, -
36 I. Microsoft Access
- (. . 1.7). -, .
Access 2003 - , - Web- .Access Web- , Jet SQL Server. -
,
.
, Access - , . -
Web-, .
, Access, - ,
.
.
, -
,
Internet Explorer. , -
HTML- Web-. ,
. -
Web-, - .
-
. -
XML (Extensible Markup Language) . HTML, - , -
. HTML Web-, XML -. XML , . XML - . -
XML - .
Microsoft Access XML, a ,
XML.
1. Access -
XML , Web. XML , XSL .
Microsoft Access Access Access Windows 98/ME/NT/2000/XP Access.
Access|)1
-
' ' '|
f-J
."'- Office Online -
.Microsoft Office OnSne
Access
: " "
_,1 ._ _
. m dbnO_2002.mdb5ystemi.mdw
-
-
-
. 1.8. Microsoft Access
/. Microsoft Access
Access, . , , : Windows XP , . -
, , Microsoft Access . Microsoft Access - , . -
Microsoft Access, , . 1.8. Access - Windows. . , Microsoft Access, . . -
( ). , , 1.9.
. 1.9. Access
Access .
Access Access.
(. . 1.7) , -- Microsoft Access , - .
(Minimize) (l~J) Access, Access - Windows (. 1.10).
. 1.10. Windows
1. Access 39
Access , , .
(Maximize) () - .
(Close) (I2SJI) . Access . (Maximize) (Restore) (1), , .
, + +. , .
, .
,
, -
. Access. - , -
. Access . Access - ,
.
-, -
. -
, , ,
.
, -
Access. ,
, . -
,
. ,
.
Access , -
I. Microsoft Access
. Access - . ,
Access (. . 1.8) (Database)., ,
. ,
, , -
, . -
(. 1.11), .
-
-
-
..,
,..
. , .
,.,
Ctrl+N
Ctrl+0
Ctrl+5
F7
Ctrl+C
CtH+V
V
-
...
Office
Alt+Shift+Fl t
AIM-ENTER
...
: Microsoft Office Access Ft
,..
. , .
. 1.11.
1. Access 41
, -
(Add or RemoveButtons). (. 1.11). - .
.
,
.
| (View|Toolbars). (Customize) , (Toolbars) - Access, (. 1.12). - .
:
-
"
"
"
"
~
"
"
? "
"
"
"
..
. 1.12.
-
.
I, Microsoft Access
(Commands) (. 1.13). , - .
. , -
, ,
Access. , , -, , .
.
| ,
.
: :
*2MMWHM -'- - ^
-
1. Access 43
-
, (Customize) (Options) - (ShowScreen Tips on toolbars).
Access ,
.
Access , - Microsoft Office, , . .
Access (. . 1.8).
,
| (ToolsjOptions). (View) .
Access : , Access, , . , - , .
.
, ,
.
,
, , . -
(Ready) , Access -. , , -
, , .
, , -
. -
. -
, .
' I. Microsoft Access
Microsoft Access - , -
, \ (. . 1.8). ,
. , .
, ,
.
| (FilejOpen) (Open) . . 1.14.
I
_
. 1.14. Access
.
1. Access 45
, Access, , , - : (Database) . Access , .
(Objects), Access: (Tables), (Queries), (Forms), (Reports), (Pages), (Macros), (Modules). , - (Groups). (Groups) - (Favorites). - .
.
.
(Favorites) (New Groups), - , ,
(Add to Group) , -. , -
.
.
. , , -
.
:
(Open), , -, , (Preview), - , (Run), ;
G (Design) - ;
(New) .
.
. , -
, .
46 ' I. Microsoft Access
(. . 1.14) (Database). Access , .
Access Access .
Access, - Microsoft Office Windows, - .
. -
, -
.
,
. -
,
. , . . -
.
.
. -
,
, Web- www.Microsoft.com.
Access |: Microsoft Access Fl(HelpjMicrosoft Access Help Fl). - Access. - .
.
-
.
. -
,
(. 1.15). ,
Access Web- Microsoft OfficeOnline. Web- , , , , , -
.
Office.
1. Access '
2050 , -
.
: _
"~ .I_-*jiV ! Access
Access ,
,
,
,
,
.
, ,
: ,
,
, ,
.
.
> Microsoft Access
k
!>
) ^
*
or ,
(&
^ *
*( ^ " i
-1 '^ Access>i>i ^ Microsoft Access^
^
-/' Microsoft Access^ Microsoft
f :
? -;#? ^
Vf , -$'
. 1.15.
Web- - , , -
, , .
, -
Office.
48 I. Microsoft Access
, -
, -
Access Web- Microsoft Office Online. ,
.
-
. , ,
, -
. ,
.
,
.
Access .
, , . 1.16. . , -
.
Office. ^
.
?* ,
;
,
. 1.16.
Access. , -
, -
. -
, ,
.
1. Access 49
1. Access?
2. ?3. ?4. -
?5.
?6. ?7. ?8. ?
1. .2.
.
3. .4. .5. .6. .7. .8. -
.
2
Access . .
. -
,
.
(), , . ,
, -
.
, ,
1:. - Access - .
-
,
, -
. ,
- .
,
, .
-
(). -
,
2. 5,7
.
.
. ( ) , , -
,
, . () - .
. ,
, , -
. , -
Access
.
Access , . 2.1.
0
3
: ml]
RP /
1 . ..!_.. 1.. 1 _ _ f i l l
CIJ.:X.I 1 1 1
. .
1-"| Access
-
-
Access
Access
/ /
RPIf
1 1 1 I I l"'"l ' 1
' * ' -'JJ
(~| Access
Access
I- i
. 2.1. Access
3 . 835
52 I. Microsoft Access
-
(), -, --
(1:).
, -
-
. -
, . ,
, -
, .
Access. -, .
-
,
.
, -
, ,
. -
, -
.
Access ,
.
,
, .
,
,
Access, - .
-
- () () - . ,
2.
.
.
-
: , , -. -
,
. : , -, , , , , , , ,
. .
-
. , -
. -
, . . () . ,
-
. .
. , -
, -
.
. -
-
.
-
() :() . -
. , -
, -
, . . ( ), , -, . . ( ). , , -
, . . -
. , -
.
,
, -
, -
54 I. Microsoft Access
.
.
( ), . . ++ , . . , . -
,
( ), . 2.1.
2.1.
-
1
2
1
1
1
1
)20
( "~~ ^
(, ), , -
.
-
.
. 2.2. _ ( ) - , + ( ) + ( ) .
+ +
. 2.2.
^ 55
.
, -
:
-
;
, . .
;
, , -
;
, . . -
, -
-
, ;
-
, . . .
(~ ^
-
.
-
,
-
,
.
, -
, -
() . - , -
. -
- , , ,
, - .
-
.
56 I. Microsoft Access
-
.
. -
.
-
, , -
, , ,
. ,
.
, -
.
-
, .
.
.
. -
.
:
;
"3 . -
, -
-
.
. - -
, , , ,
, , . . -
. -
;
,
, -
(, . .) .
2.
- -:
- () ( , -);
- ,
, ( -, ).
, - -
, - -
, ;
] () .
. -
-
, .
() -
.
-
.
, ,
. . .
, () (). . -
, -
. " "
(. 2.3), .
KODTNAIMCENAEI
. 2.3, " "
58 I. Microsoft Access
-
, . -
.
,
, -
.
1. -.
-
. ( ), -
. , ,
(), , . . -
-
(, , ). - - (, ) - .
(, , . .), , - . -
-
(), ( -). -
.
2. - -
, . . ( ), .
-
,
. 2.2.
2.
2.2.
()
,
,
3. , . -
-
. , -
.
-
. -
.
.
-
.
, -
, , -
-- (M:N). , - .
-
, -
, .
" "
" ".
/. Microsoft Access
, -
.
, ,
, -
.
:
;
(); , ;
;
3 - . -
.
" ",
" ", " ". . 2.4, 2.5, 2.6 - .
,
. 2.4. " , '
/, /
.
. 2.5. " "
2.
.
.
. 2.6. " "
. -
. 2.7.
.
h
9
" " 200 .
.
-
. -
()
. 2.7.
- ()
(. 2.8). , -
,
/ - .
62 I. Microsoft Access
, _
_200_ .
,
-:
200
-
_ .
. 2.8.
,
,
, .
, -
, ( )., ,
:
, . .
,
. -
, ,
.
.
" ", -
, . 2.9. - .
2. S3
, . -
, (HAHMJTOB), ( ) , () , . -
(_). , _ .
, , -
.
_
_
_
, 2.9.
, . .
, . .
.
(_). -
. (_, , ,
, , , , . -
-
.
. 2.3.
I. Microsoft Access
2.3.
TOE
-
_
_
_
_
" ". -
" -
", (. . 2.9). - -- .
(__), (_), (_) (_), - . ,
(_) . , - -
, . . , -
.
.
^ _ , -
-
, .
" " . 2.10., _
. ,
2.
. _
_ _. ,
-
.
.
_
_
_
_
_
_
*
. 2.10.
, -
, .
,
_, ,
(), _. - () _ _. _
__ . .
. 2.4.
2.4. " "
()
_
__
_
_
_
_
__
_
,
66 I. Microsoft Access
, -
,
.
" "
. 2.5.
2.5. " "
_
^
_
_
_
_
, " "
.
, , -
,
.
"".
"",
(. 2.11). .
"".
.
.
: , -
( , ) , ,
2.
. -
.
""
_
_
_
_
_
_
_
_
_
^
*~
-
-
. 2.11. "'
-
, , , , , . -
, -
, ,
.
, -
, .
-
. ( ) , , . .
.
, -
.
, -
, , , ,
.
, ,
.
68 I. Microsoft Access
, ,
. - -
, , ,
,
.
,
. , -
, .
+ .
,
,
, . . , -
-
+ + (. . 2.11). "". -
, ,
, .
-
. , ,
(). "" - . 2.6.
2.6. ""
_
_
_
_
_
_
2. 69
"".
. -
.
, (. . ). - -
+ .
.( ) -. , ,
( - + ). .
,
.
, . , -
, . . -
. , ', -
' "" .
'-
' .
' .-
-
, .
( ), , -
. ,
- .
'' ' . ( - ) ' , ..'
, ,
-
. ( ), ( ), ( - ). , , , -
, , -
.
-
. , -
70 I. Microsoft Access
, . . -
, .
,
.
, -
, , , -
,
.
, , ,
,
.
- () -
. -
,
-
. ,
[] - + -f . . 2.12 .
""
_
_
_
_
_
_
_
_
*-
. 2.12.
2. 71
. -
, , -
, . -
. , -
,
(). - . 2.7.
2.7. ""
()_ _
_
_
__
_ _
_
_
-
.
. , , -
, ,
. ,
.
, ,
, , , . .
:
- (1:1); - (1:); - (M:N).
I. Microsoft Access
- ,
() (), -, () (). , , -
,
, . . -
. -
. 2.13. - : - , . .
1 : 1
. 2.13. -
- (1:) , () (), () - (). - . 2.14.
1 :
. 2.14. -
, , . .
. -
- : -
, , . .
- (M:N) , - () - (), , () (). M:N . 2.15.
. 3
-
' N
'
. 2.15. -
-
. , -
, -
"".
- . , -
- -
(. 2.16).
: N
Kb
1 1 :
. 2.16. : -
- , -
(. . 2.16). -
-, ,
. - -
, . . , -
- .
- -
, ,
.
-
, , .
" ".
74_ I. Microsoft Access
- -
(1:), . . , -
.
, -
, -
1:. - ,
(). - ""
, ,
^, . -
- ~~
_,
, .
"" ,
- .
-> _. - ,
( ) ,
( ). > , - - .
-* -
-, -
,
.
, _ -
- - ,
- - -
(. 2.17). . 2.8 - -
.
2.8.
1 ;
1:
2. 75
2.8 ()
_
M : N\ /
N\ /
. 2.17. -
-
. 2.18 - - , -
.
- , -
. -
, .
,
-
, --
.
I. Microsoft Access
i , -
, .
, .
.
.
1
2
3
. 2.18. - " "
Access -
. -
.
:
, ()
7 I. - Microsoft Access
- _
_
-
.
'
_
- _
_
_
_
1
_
1 _ -_
_
.
1
. 2.19. " "
1. ?2. ?3. ?4.
?5. ?.6. , -
, ?7. , ,
, ?8. , ,
, -
?
2. 79
9. ?10. ,
?. .
12. ?
13. .14. - ()
1:. ?15. ?16. - -
?
17. - --?
18. ?
19. ""?20. , --
?21. ,
?22. , -
?23.
?
1. , , .2. -
, , -
.
3. , .4. -
() .5. ,
, -
Access.
80 /. Microsoft Access
6. .7. .8. .9. _ .
10. . :
11. ; ; - ^ ; -, ,
.
12. .13. -, -, -.14. .15. , -
.
16. .
17. "".18. .
19- .20. , ,
, .
21. .22. , .23. .
-
3
Access - , -
. -
.
, . --
,
-- --. --
-
,
, .
, 2. -
. -
. -
, . Access .
, -
Access . -
, -
.
, . .
.
. -
/, - . (. 5, 6) , .
82 4acTbJ. Microsoft Access
6. .
-
,
. ,
.
Microsoft Access (. . 1.7 /). - .
,
. .
^
Access | (ToolsjOptions), (View) -
.
|(File)New) (New) (ill) (Database). (New) : - , ,
.
(New Database) .
(Data Access Page) Web- - . -
, , -
Microsoft Access Microsoft SQL Server no .
Microsoft Access. ,
. -
, -
(Pages) , . ,
3. 83
, -
, ,
.
Access. .
-
Microsoft Internet Explorer 5.01 SP2 . Access Office Developer Edition .
Project (Existing Database) - Project (New Database) - , ,
SQL-.
. Microsoft SQL Server 11.
.
j (
~
. , . , , . (,
( )
[ -
Office Online
. 3.1.
4 . 835
84 J^ Microsoft Access^
, -
( ) Web- Microsoft Office Online (www.Microsoft.com). , . -
(. 3.1). (General) . (Blank Database) -
. .
,
.
AccessAccess , . , -
.
(New Database). (File New Database) (. 3.2) - (Save in) , , , , "
TOBapOB.mdb", (Create). : (Database).
, Access, MS Office, - (My Documents). - -
] (Tools|Options) (General) (Default DatabaseFolder) , -. | (Tools|Options) - .
, ,
255 , , Microsoft Windows 98/NT 4.0 215 , , Microsoft Windows 2000/XP Millennium Edition. -: \, / , - , : * , ? , " , < , > , |.
3.
Microsoft Access(*.mdb) (Microsoft Access Databases), , mdb. - Windows Access.
;
*
.'"}
] _-J - ,jj ' ^ _j_2003,^
;
;
.
. mdb
Microsoft Office Access (*.mdb) *
. tl
86 I. Microsoft Access
(File NewDatabase) , - . UES - . -
(Up One Level) . -
(Views) . (Tools) - ,
. , -
.
,
, , .
: (Database) (. 3.3) - (File New Database) (. . 3.2).
: ( Access 2002 - 2003)
'^. | X 1
. 3.3. " "{ )
(Objects) , :
, , , , , .
3. 87
. -
"
Microsoft Access" 1.
.
: , ,
, , , ,
.
.
(. . 3.3) (Tables) (New). (New Table) - (. 3.4). ( ) ,
(. . 3.3). -, .
.
. 3.4.
(Create table in DesignView) (Design View) (New Table) - , -
.
.
I. Microsoft Access
!: (TableI: Table), (. 3.5).
SB ! : - )
_
OL
IME IME-
,
.
F1.
. 3.5.
,
-
(Table Design) (. 3.6).
, -
, -
Access. - () .
3.
*
[ *.' ,.,
.
\ [:^ | ^J. Ctrl+S
r-'J ,^4 .,,
v" Jj L
,., F7
-' /* Ctrl+X
v [^ J Ctrl+Cv .^ " Ctrl+V
Iv1 i,J^
9 I. Microsoft Access
(Field Name). , Access. - , , , -
".", "!", "[ ]". ASCII 00 31. 64 . (Data Type). , , ,
. Access -.
(. . 3.5). , Access, .
" ".
Access : " , Microsoft Access (MDB)" " (MDB)".
(General) . -
(. . 3.5). , -
.
(Field Size) , - . 1 255 ( 50 ). - :
(Byte) 0 255, 1 ; (Integer) -32 768 32 767, 2 ; (Long Integer) -2 147 483 648
2 147 483 647, 4 ; (Single) 3,438
3,438 7 , 4 ; (Double) -1,797 10308
1,797308 15 , 8 ; (Decimal) 1038 1 1038 1
( , adp) -1028 1 1028 - 1 ( mdb) 28 , 12 ;
3.
(Replication ID). - (Globally unique identifier, GUID), 16 . Access , , ,
.
:
(Long Integer) 4 ; (Replication ID) 16 . ,
, . .
-
.
, -
,
.
(Format) , -
.
Access (Number), / (Date/Time), (Yes/No) (Currency). - ,
Microsoft Windows. - , -
OLE, .
(Format). (DecimalPlaces) -
.
0 15. ( (Auto)) (Format). , ,
(Format) (GeneralNamber). (DecimalPlaces) - , ,
.
(FieldSize). (Caption) , ,
, .
92 I. Microsoft Access
G (DefaultValue) , . -
, = N O W ( ) , . -
, , .
(DefaultValue) -. 255 . - (AutoNumber) OLE (OLE Object).
(ValidationRule) , , -
,
(ValidationText). (ValidationText) , -
,
(ValidationRule).
, -
, .
.
(DisplayControl) - (Lookup) (. . 3.5). ,
(Text Box), (List Box) (Combo Box). (List Box) (Combo Box), (Lookup) - ,
.
, ,
.
(LookupWizard), (Lookup) - .
3. 93
() , . , -
, .
, ,
Nul l . , Access Null . ,
( 10). , , (Table Design) - (Primary Key) ) (Edit Primary Key). .
, . -
: (Indexes: ) (. 3.7) - (Indexes) - ) (View)Indexes).
f : [5]
j
PrimaryKeyJ1 _
KCVLCK_
I
"'
,
j
. 3.7.
. 3.7 , PrimaryKey, (Field Name) , . -
.
-
Access . , .
94 I, Microsoft Access
, -
, .
,
, . -
, ,
. 32 .
-
(AutoNumber). -
( 1) . - .
. 4 - , J6 . - .
. -
, Access . Access (AutoNumber).
" "
2 "".
, Access ,
(New Database). (FileNew Database) , , - " .mdb" (. .-3.2). (. . 3.3) : ( Access 2002 2003).
" " -
(. . 2.3, 2.5, 2.6, 2.7 2), , -
, . 3.1.
3. 95
-
. (. . 3.3) - (Tables) (New). (NewTable) (. . 3.4) (Design View). ,
(Create table in Design View) pa .
. 3.1 -, -
!: (. . 3.8) (Field Name) (Data Type).
^ j -
. 15 - 4 . 8 .
(General) : (Field Size):
_ , ,
(Single); ,
;
(Format): (Currency).
MicrosoftWindows : 123 456 789,00 ;
_ .
_,
,
100 . , , 15%, 7,5%;
(DecimalPlaces) - 2, _ 0;
(Caption), (ValidationRule), (Validation-Text) -, . 3.1.
I. Microsoft Access
3.1.
__
TOE
-
-
-
-
-
-
-
OLE
~)
-
5
25
8
-
-
.
-
- 2
-
_ : >-, 05And =0 And
3. 97
:
^
_[ |
V
|
-
0
0>=0,OSAnd -5 %
98 t. Microsoft Access
.
. 3.1. -
. { (File|Save) (Save). - (Save As) ! (. 3.10).
;
. 3.10.
, -
.
(Tables) - : .
, -
.
, , -
(View) (. . 3.6) (. 3.11).
\
. 3.11.
1. , , , ,
, _. -
(. 1).
3. 99
, ,
, , , _ " ".
OLE , -
, Paint bmp. OLE (OLE Object). -
. Access -. .
.
OLE (Object Linking and Embedding ) Windows. OLE , - . -
, ,
.
, , -
, (WAV), MIDI {-- ), (FLI, ), (AVI), , - . Access, OLE, - Microsoft.
. -
, ,
, .
. -
.
.
. -
,
. -
, , , -
, , .
,
.
^f MEMO , -
.
MEMO (Memo).
100 I. Microsoft Access
-
, +.
, , Microsoft Word, , OLE (OLE Object).
.
(Hyperlink) - .
(Hyperlink) Access , - Microsoft Office - , Web- - .
,
.
( _ ).
() - _ _.
, -
, - (Primary Key).
_.
/ -
_. /. ,
. -
.
_ . ,
( , ) , , , -
3. 101
. ,
00.00.0000, 00->L
102 I. Microsoft Access
.
( (Records|Remove Filter/Sort).
*
,37. .# *
..,
* haJi
v | -^ ,,-
,.,
Ctrl+S
F7
+
CW+C
Ctrl+V
CtH+Z
CW+K
,.,
... Ctrl+F
Ctrl++
QKHO F1I
Microsoft Office Access Fl
.,.
'--
...
,..
^:
. 3.12.
, -
, , -
3. 103
. -
.
Access , - . ,
, , Access . -
, , , -
. , -
.
. , -
-
. -
.
-
. , ,
, , , ,
, .
, , -
. -
.
. -
(Format) - ( ) (Formatting (Datasheet)), .
:
.
, .
.
;
.
, ,
.
, ;
104 I. Microsoft Access
. ,
;
.
.
, . -
( ); , , ,
-
(Format); (
(File|Save Layout) - " ''(Do you want to save changes to the layout of table 1).
" "
. -
: (Open). (DatasheetView). () (. 3.13) - (). , - 2.
:
[ [ ] 031 ; 17LG 6587,.002 FDD 3,5 363,00.003 :HDDMax1or20GB 2590,00.
916,00.1 153,00.
360,00.2432,00.2 338,00.
5%; 20%: 10%:
MiniTowerCD-ROM Panasonic IDEDIMM64MPC10Q EPSON ST.A4
1
. Genius Liv 789,00. Genius ext 1 295,00. .
' 00. "10 |>#1 10
,
,
. 3.13.
3. 105
( , ,
) . - .
,
] . . -
( ) - | / (Edit|Undo Current Field/Record). -
( ). - () , | (Edit Undo SavedRecord).
(Undo) , - . -
,
. -
.
, -
(*). -
|] (Edit|Go To|New Record) - (New Record) (Table Dataslieet). -.
, , ,
.
] (Records Save Record).
(Delete Record) - | (Edit|Delete Record). - Access -
106 I. Microsoft Access
. -
.
-
. Access . ,
. ,
. -
-
/ (Undo Typing). - ) (Records|Save Record). OLE OLE . Paint bmp. .
(CMI . 3.13). ] (Insert|Object). (. 3.14) (Create from File).
Microsoft Office Access :
*
1
j I Microsoft Excel;, Microsoft PowerPoint1 Microsoft Word Paintbrush
!_ Microsoft PowerPoint
OK
"
'
Paintbrush'.
. 3.14.
(. 3.15) . (Browse), - ,
.
3. 107
Microsoft Office Access
***
(*
:
;E;\Documents and Settings\NVP\MoK |!
" g
- -
,
. 3.15.
(Link) , , .
. -
.
(Link). , .
. 3.13, , .
.
,
, (Insert Object) - (Display As Icon). .
_.
_ -- , .
_ - -
.
.
. ,
, -
I. Microsoft Access
. -
, -
, -
.
_
,
( ) . ,
.
(. 3.16).
;08.01.2003
_
001222
_ :
444 _ CPOKJIOCT | _ | _555
:
:
. 3.16. _
-
(Tile Horizontally) (Tile Vertically) (Windows).
), . " -
", ,
. -
, .
3. 109
. -
-
.
.
_ _ ( ) , . -
_ (. . 3.5). - _ (Data Type), (Lookup Wizard). - (Create Lookup) - ,
(. 3.17).
,
.
? 9
( |0 " " | ,
*~ .
. 3.17.
, -
(. 3.18). ,
(. 3.19).
110 I. Microsoft Access
,
.
; ; ; : _:
; ;
-'
(
<
. 3.18. ,
;
_
_
? " ".
:
< I >
. 3.19. ,
. . -
3. 111
, ,
(. 3.20).
_ :
J? ^17'
_
MHHJTOCT "
:
-
5ELECT ,_ FROM ;11
2., 5482,54
. 3.20. , ,
_
, _,
(. 3.21). - _.
__ ,
.
(. . 3.20) , ,
, .
, . 3.22. - , ,
.
,
, .
112 I. Microsoft Access
:
KQflJQB | _ _ | _111111
111 10
10020
"
~50
001TQ01TQ03004
12230
1045
150
100121030
0 1C
. 3.21.
Microsoft Office Access
.
, .
. 3.22.
.
_ _ ( ) . ,
_ (Data Type), (Lookup Wizard). _ ,
, , : _
( ) _ ( ). , , ,
(). . 3.23. () - , . -
(. 3.24).
3.
to _ :
_
_
CPOKJTpCT
!
KOJTJIOCT ._
1
SELECT ._, 0 , JOB FR'1>*1 12
. 3.36.
128 I. Microsoft Access
,
Null. , 15 16 - .
( }, > _
, _ -
, , .
Access , .
, -
-
. , -
_,
_ ( ), _ - _, . .
. -
_, _
( ). , ,
"+" (. 3.37). "+" , -, . "+" ""(). "- -" . .
, -
, , -
( , ). ,
)| (Formar|Subdatasheet|Expand All) (Collapse All). Access .
3. -'
17LG 1 10 17LG 2 _ 5, 17LG 3 5FDD 3,5 10'FDD 3,5
10D2D
'
50"
222 0,00.
| 17LG 17LGHDD Maxtor20GB MiniTower
i:I
: __). !
. 3.37.
Access , -- -
--,
.
"+" (Subdatasheet). (Insert Subdatasheet) (. 3.38), - .
,
(Insert Subdatasheet) , . -
_ -
, -
(. 3.39). -
.
130 I. Microsoft Access
(
-
1TTJ02
+ TOQ4+ TD05+
TDQE+>
07+'008
* TD09+ 7010
: ..H.LiJ
: ;_
: JOB
. 3.38.
Microsoft Office Access
'Microsoft: Office Access* .
?
. 3.39.
, , ,
[ -. (Subdatasheet Name) , (Link Child Fields) (Link Master Fields) ( ) (. 3.40). , -
(SubdatasheetName) , . (Subdatasheet Name) (Auto), , - , Access "+" .
3. 131
!
, , , . .
. . .
, . .
, .
..-, ,
, , , .
. . . .;
, _
_
_
. 3.40.
:
>
-f
IHi
01
;'"
03
*
]
| *- ,- 001
.. : , 151
25.01.2004
001TD05008
*|2+ '
+ HOQ4+ 005
111
1020
29.04.200428.04.200425.05.200410.03.200430.01.2004
| *- J- 001
"*"
*
*'
: JlLl
10
222
2222221
. . ,29 .. , 38
} 25.03.2004
004TD06_
D3 '
j111
5
26.03.200420.01.2004
30.01.2004
4 ' J ^]
:
1111 :
132 I. Microsoft Access
,
, "+" - . -
.
, -
, (None). - (None) || (Formar|Subdatasheet|Remove) - .
, :
. . 3.41 .
:
] - 01
..
[ ^ | -.HD01 25.01.2004 111
\ - 001
|_ _^_ * 17LG|*_
- TQ05~ {
6587,00. 0,00
20^
|
5%
+ CD-ROM Panasonic IDE ; 1 153,00. . 30%.
- TD08
__ *
*
2338,00. 0,00
002
004005
29.04.2004 2228.04.2004 25.05.2004 22210.03.2004 222
:.. .,29' | 1!
. 3.42.
' 3. __ 733
, -
, , ,
.
, , -
,
, -
(. 3.42). 5. ?.
, ,
.
, .
, , , -
, . -
. ,
, -
. ,
.
, .
, ,
-
. ,
. -
,
,
(. 3.43). .
-
(. 3.44)., , ,
.
(Primary Key) -
134-' I. Microsoft Access
(Indexes), - . ,
, -
, . 3.45.
Microsoft Office Access
.
ReldSee , .
?
Microsoft Office Access
. 3.43.
'_' 'Microsoft Office Access1 \ .
.
11111 |
. 3.44.
^^\ - , *\ . , , bw , , .
Miciosoft Office Access
. 3.45.
, -
, .
: , , - .
3. /35
, ,
. , -
,
.
, -
,
.
. | (Tools)Relationships) (Relationships) -. (Relationship).
(Show Table) (Relationship). (Show Table) (. . 3.26) (Add).
. -
| (Edit (Delete) . , -
, , -
, (DeleteRelationship). -| (Edit (Delete) . -
, | (Relationships]Edit Relationship) .
1. Access?2. ,
?3. ,
-
?4.
, ,
?5. , -
-
?
136 I. Microsoft Access
6. -,
?7. "+" ?8. -
?9. , -
"+"?
1. . -
.
, .
2. 1: 1:1.3. ( ) .4. .5. .6. .7. .8. ] (Insert] Subdatasheet).9. (Subdatasheet Name).
4
,
.
, -
. ,
, , . -
. ,
.
. ,
, , -
. -
. .
,
.
,
, . -
, ,
. , . -
-
.
,
.
, , ,
.
, .
138 I. Microsoft Access
:
;
, ;
;
,
, -
;
G ; ,
;
;
.
. ,
- , -
, -
. ,
, -
. -
. -
: , - .
(. . " Access" 3).
, .
Access : -
. , -
. -
.
, . ,
. -
, -
.
4. /39
-
, , , -
.
G , , -, .
-
Access.
, .
.
. ,
, .
.
.
, , , -
. , ,
, .
-
.
.
. .
.
.
(Query Datasheet) (. 4.1) , , (Table Datasheet) (.. 3.12 3).
^ ! ! : -J
1 ?i I X> VB / I 4A I - - - -* *. ' , / _t-M
;J ; ,,^ -,;._ -- --=>
. 4.1.
, , -
, , ,
140 I. Microsoft Access
.
,
. , , ,
, -
. ,
, -
.
(QueryDesign) (. 4.2). , .
-
si| ,,."
;*- X IIpjrf^z^""*^-^^.^!"^ 5J| In"
_jf ..,i.-**?;-
l?f ,.,
">|'=
:>jj[ Ctrl+s00,1 ...
|_ ? ... F7
! CtH+X
[yj -jj ! Ctrl+C .^ CCH+V
^ |||1| ! / ^
j] ? .
v1 '^_j ... -
|| / _^ Alt+ENTER
- .{N , . ,. 1 F1 1
-
v ;-JM| ^ 1 : Microsoft Office Access Fli J '"' 7 ........_
. 4.2.
4. 141
,
.
(Database) (Queries) (New). - {New Query) (. 4.3) (Design View).
$ \\ ; .
Ely
I
. 4.3.
,
(Queries) - (Create query in Design view). (Show Table) (. 4.4) -
(Add). (Close). - 3anpoc(Query): (Select Query) (. 4.5). . -
, -
. ., -
, .
. I. Microsoft Access
| \
! 1 '-
!
. 4.4.
ts- :
: ;
:
; :
:
; I ! '
. 4.5.
-
, . -
4. 143
, (*), - . ,
Access , ,
.
, Access , , -
.
. -
. -
, .
. -
, -
.
,
(. . "- Access" 3).
(~ j , Microsoft Access , ,
, . .
. 10 , 4, - 40 (10x4). - .
.
-
.
.
, -
. -
, , ,
.
( ) - :
(Field) , aaripbctf: (Sort) ^-
;
144 I. jWicrosoft Access^
G (Show) , ;
(Criteria) ; (or) ,
, ,
. (TableName) , | (ViewjTable Names) - .
,
. ,
, -
, ,
Access. -
:
(Field) - . -
, ;
\ - ;
;
3 "*" () .
| (QueryjShow Table) (Query Design)(. . 4.2). - , .
-
, , ,
.
.
4. 145
-
. -
, , ,
(. . 4.5). | (EditjDeleteColumns).
. ,
, -
.
(Criteria) (. . 4.5). , -
.
: , -, (). , Access , . ,
, . -
, "ft" ( (') ANSI-92). : 567, "", #1--2004# ('1- -2004 ' ANSI-92). ,
Access, , (True), (False), Null. ,
. -
, , . . .
, Access .
,
.
, , , , -
, ,
.
: [ ] ! [ ], DefaultValue - :
F o r m s ! [ ] ! [ ] .Defaul tValue.
146 I. Microsoft Access
, -
, : = , < , > , < > , < = ,>=, Between, In , Like , And, Or, Not.
.
,
= .
,
, .
, .
(*) - (?) (ANSI-89) (%) (_)(ANSI-92). Between -. :
Between And loo 10 100;Between # o i . o i . i 9 9 7 # And # 3 1 . 1 2 . 2 0 # ( ANSI-92 "#" (')).'
, . :
In("";""; " ") Like , . :
Like "* " (ANSI-89) Like "^" (ANSI-92) AND, OR, . , -, "", -
"".
-
AND OR . NOT .
Access - .
.
, , 1000 . 10%, , 2500 . (_), () (_>.
4. 147
(Queries) (Create query in Design view). : (Select Query) (Show Table ) (. . 4.4). (Add). -
(. . 4.6). (Show Table).
1? ? ; L ||C iXl
_
08
_
1 v
< >
:
:
:
:
:
:
_ _ "
^
0 0 0: ""
. 4.6.
.
() . (. . 4.6) - _, , _
(Field). ,
. ,
6 . 835
148 ^ I. Microsoft Access
, ,
. , . (Show) , - .
, . 4.6. , ,
AND. , , - OR. ,
(Run) (View). ,
.
, (Save) "!". , - , .
]3 (FilejClose) (Close). -, (Open).
. -
.
. -
.
-
. -
.
(Field)., ,
(Exprw), N ~ , - . ,
, . :
!: []*[], .
4. 49
! - . .
, , ,
.
. Access VBA 150 . .
.
.
(, , ); , Date - , Month () , - , 1 12 -, . .thName ( [; ; ) , -
(=) (=) -. , MonthNamet [_]; ) - . (- ).
.
. , , Format, ( , ) .Format([; [; __[; -__] ] ] ) . , .
. 4.1.
4.1.
dddd ddd dd ww
mmmm
mm
mmm
150 _ I. Microsoft Access
:
Format ( [] ! [_] ; "mmrtm" ) 6 ;
Format ( [] ! [_] ; "mm") .
,
Format , "\". -, Format { [] ! [_] ; 'mmmrn\ yyyy' ) - . .
.
,
.
.
,
.
. Excel - , ,
. .
. -
, , , , -
.
-
(Expression Builder), - (Build) . .
, ,
.
__ / (Date/Time).
(Field), :^(!_) , ;MonthMame (Month ( !_) )
Format { [] ! [_] ; "mmmm") , .
4. 151
Month . MonthName . Format - .
, , -
3, . 4.7. , , -
, . 4.8.
_
_
_
HOMJHAKn
0
]
4.
!, 2 . . .
(Exprw) . ,
, .
(FieldProperties), (Properties). (Field Properties) (General) (Caption).
,
.
-
. -
, ,
.
(Criteria) . (Enter ParameterValue)., (. . 4.7) [ ], (. 4.11), - .
'|
. 4.11.
154 I. Microsoft Access
.
-
. -
,
. ,
-
, OR:[ ] OR [ ].
, . -
, -
[ ?] , . 4.12.
: ! - j[DJ[XJ
^
_ :1_ .
v-
.
4. /55
Access : sum ;
Avg ; , Min , ; count ;
stDev ;
var ;
First Last . -
.
. ,
, , -
.
| (View|Tota!s) -
(Totals). - (Total) ( - ). (Total), (Group By), , -
(Group By) -.
.
.
Sum,
.
_.
I. Microsoft Access
. -
_ . -
.
_, sum -
, .
(Totals). (Group By) __ sum. . , . 4.13.
'0 ? :
HOMJOT_
; :
;;
; ;
1 i
. 4.13.
. 4.14.
$ ? : P]f6][x]
>_
17LGFDD 3,5HDD Maxtor2QGB MiniTowerCD:ROM Panasonic IDE
; H | ^ | j i ' >
Sum- 262
60103040
[^ "| 5
. 4.14.
4. 157
_ ,
_, . ,
_ .
_ ,
3, .
Sum - _ . , -
_ . -
(Properties). (FieldProperties) (Caption) . . 4.15.
? : -
17LG_FDD 3,5HDD Maxtor20GB MiniTowerCD-ROM Panasonic IDE
: 1 MM 5
. 4.15.
- " ".
, -
, _
_, (. 4.16,. 4.17). ,
,
(. 4.18, 4.19).
reo I. Microsoft Access
" ". -
. 4.21.
'is* :..
> 111222
: JJLJ_j.J |
.001-_
1 * | |
, 453
j^ 3
. 4.21.
, -
,
.
,
, . -
10 000 .
_ (Group By) sum. _
(Group By) (where), 6 . (Criteria) : >(. 4.22).
:
:
:
:
; ;
;
_
121
000.
, ,
. , -
.
(). :
DMax(, , [_]}
, -
, , -
, .
.
DMin . . 4.24 , , - .
, " ".
DMaxf"[-_]";" ").
162 I. Microsoft Access
lir 3dnpoc13 :
:
:
:
:
:
:
_
0
-_
i
< |
Sum-
0("[5-_] ; " ")
*>
. 4.24. ,
1. ,
.
SQL SQL (Structured Query Language) - , .
Access SQL, Microsoft Jet. ,
SQL. Access - SQL, , SQL. - SQL . -
SQL , - Access. ,
SQL. , Access SQL. , SQL (RecordSource) (RowSource). -
^4.
,
.
Access SQL - SQL:G ANSI-89 SQL ( Microsoft Jet SQL ANSI SQL)
Jet SQL; ANSI-89 1, ;
ANSI-92 SQL , ; ANSI-92 1, .
J ANSI-92 SQL Access 20022003.
Access , - , -
, -
.
MicrosoftAccess, Microsoft SQL Server, , -
SQL Server, ANSI-92 SQL. , , -
ANSI-89 SQL. Access 20022003 ANSI-89. SQL ANSI-92 - ,
:
d , , Access2002 2003;
CJ SQLServer (ANSI-92) .
ANSI SQL. ANSI-92 SQL SQLServer (ANSI-92) . - ANSI-89 SQL .
164 /. Microsoft Access
, -
, .
, ANSI SQL - .
SQL L. (. . 4.6)
"!".2. SQL (View) -
. Access , , SQL (. 4.25).
is1 1 : ISELECT ,_, ., . _IFROM IWHERE (((,)
4. 165
4. , - _.
5. ,
(. . 4.20, 4.21).6. SQL. SQL
, . 4.26.
:
[SELECT ._, Count ( . ) AS [Count - ^ ] IFROM GROUP BY . _; V
. 4.26. Count SQL
SELECT . _, , , -
, count, _. ,
count: __, - .
, , *
, , -
, .
(Group By) , - (_ - ) .
.
,
.
, ,
, . -
,
.
166 I. Microsoft Access
, -
,
, -
, -
. -
, .
-
.
-
, -
.
-
. , ,
.
, ,
.
(Queries) (Create queryin Design view).
(Show Tabie) (. . 4.4) -5 : ( _); _ ( _) -
, ( _); ( ), -
__ ^.
(Show Table). ,
. _
. _
, , -
, (. 4.27). -
. _ -
, , , ,
.
4. 167
:
* A.I_ :
' I
|__ v.|
gj
; :
:
:
:
:
*
_
'_
D
'.
V
. 4.27.
,
, (Field): _ ; _ ; _ __ - _1. ,
. -
(Table Name) , ] (View|Table Names) .
,
- FDD 3,5. HDD Maxtor 20GB. (Criteria) -, _
"FDD 3,5" "HDD Maxtor ". HDD -, "*". -
-
Like, . , . 4.28.
/. Microsoft Access
:
KOfiJTOK *;
_
!.
_
.
_
KCVLTOB_
_
:
:
; ; ;
:
HAMMJ10K
0
4. 169
). ,
--
, ,
.
_
, . ,
_ -
. _
, _ -
.
, , -
, ,
; - .
.
: , ,
-
, .
" ".
SQL , -
.
SQL, (View). - SQL :SELECT ._, J1J1AH\ _, . _,_._
FROM INNER JOIN ( INNER JOIN ( INNER JOIN_ ON ._ = _._) ON._ = ._) ._ =_._
WHERE (((.HAMM_TOB)="FDD 3,5" Or (.HAKMJTOB) Like "HDD*")); FROM SELECT -, ,
INNER JOIN , - , : ON ._ = _._.
170 I. Microsoft Access
INNER JOIN -, . ,
: _ ,
, , .
- , - _ ^
, . 4.30.
1 :
mKOflJTOK
_
; _^
.
.
_
_
*_
WHJTOCT
. 4.30.
,
, , -
(. 4.31). , , ,
,
Null.
, -
Null. -, , . .
Null. Not Null, ,
.
SQL :SELECT .__, JUIAH. J10CT, .__, .
4. 171
FROM RIGHT JOIN ( LEFT JOIN ( LEFT JOIN_ ON .^ = _._) ON._ - ._) ON ._ = . ;
is* ; .. ; |! '
^_
: Hj^ j J | 1
*
1 17LG 1002 17LG 203 17LG 301 : FDD 3,5 503 FDD 3,5 101 17LG 1002 : 17LG 13 I2 HDD Maxtor 20GB 103 MiniTower 301 : CD-ROM Panasonic IDE 40
'
TJ> ] |>#j 16 < jj
. 4.31.
LEFT JOIN -, .
( ) , () .
, . -
RIGHT JOIN -, .
( ) , () .
_.
, -
-
.
, -
. ,
. -
_
172 I. Microsoft Access
, ,
_.
. -
, . Access -
.
_ -
(. 4.32), . ,
:
[ ] , -
:
[ ]
; :
:
:
;:
HAWMJ1OK
0
1
_ -*4;
0[ ][ ] >
*...! JL
. 4.32. _
Access , . 4.33, -.
[?JfXj
!
. 4,33.
4. 773
SQL. WHERE :
WHERE (((. _} = [ ])) OR(((. _) = [ ]));
, ,
.
,
, . -
, _ , ^ -
.
,
.
.
_ ,
_ sum. _
: Between #01.02.2004* And #20.02.2004*(ANSI-89) Between '01.02.2004' And '20.02.2004' (ANSI-92). -
,
. 4.34. . 4.35. SQL. SELECT :
SELECT ._, Sum(._) AS [-_]FROM INNER JOIN ( INNER JOIN ON ._ =._) ON (._ = ._) AND(. ^ = . HOMJIAKTI)
WHERE (((._) Between #2/1/204# And # 2 / 2 0 / 2 0 0 4 * ) )GROUP BY .HAHMJTOB
ORDER BY Sum (._) DESC; SELECT , .
FROM , - _,
, -
, .
174 I. Microsoft Access
:
_
_
_
V
; :
:
:
; :
.
.
'
Between #01.02,2004* And #20,02.2QCrt#
. 4.34.
-, ''-.
[DJ[XJ | -._ |
CD-ROM Panasonic IDEHDD Maxtor 2QGBFDD 3.5
; 11 I 1 I I 3 3
. 4.35. ,
WHERE , - . _ .
GROUP BY , _
.
Sum (. _) , -_.
> > ORDER BY , .
. -
() (._). -
. -
4. 175
-
. " ". " ".
-
. ,
.
, ,
, ,
.
, . 4.36.
t- 1C :
. s^
_
_
_
:
:
; :
:
0
_
[ ]-[ ]*[] .""
1< >[_]*[]
'""
. 4.36.
(Criteria) _ ;[_]*[]
,
.
, :
[ ] ! [ ] .
176 I. Microsoft Access
,
, , :
[_(] - [_] * [] -
! . . 4.37.
:
|^ ; 17LG 3174,00. -10000,00?.004 02 HDD Maxtor20GB 3590,00. .004 01 33 380,00. 10 000,00.
I !*
. 4.37.
, ,
, . . -
.
SQL. SELECT :
SELECT ._, ._, ._,.__, [_]-[_]*[] A3 FROM T05AP INNER JOIN ON . __ = . _WHERE ( { {. _) [__] * [] ) ) ;
SELECT , , , -
.
.
,
. -
4. 177
. -
.
, , -
,
- ,
.
,
. - , -
,
. 4.38.
,
1
,
2
1
1
1
2
. 4.38. - ,
,
.
, ,