Σημειώσεις για...
date post
28-Dec-2015Category
Documents
view
91download
3
Embed Size (px)
description
Transcript of Σημειώσεις για...
V IEK 2013
igaviotis@gmail.com 27--14 . 1
V Client Server IDE RDBMS
1. . , , "" , C. - , , - . , -, . . . . . . SQL , ' '. , , , , .., . .
, Mi-crosoft Access: / .
. - 1. "" .
: , ( 'idiot-proof', ), - ( ), , .
. - (server) , . "" "" -2.
1.1
3-10 . , -, - , .
, . , 2. - - , . & . .
1 , 1, , ,
, , . , . 2 .
-, , - , , ..
1
2
IEK 2013 V
. 2 27--14 igaviotis@gmail.com
, , PEL-DAT.ACCDB. .
, PEL-APP.ACCDB,
( , Access3), , , . - Access - (attached tables). , Access Excel, - .
, - , - (copy&paste clipboard) Windows.
tblAddresses 3 ( - ), PEL-DAT.ACCDB. - . , ;
, , :
, - ( , , ) .
, (backup).
: -, PEL-APP.ACCDB, - - .
, . - (file server), , . - . , , ... !
, /. ,
1.2
. ,
( 5).
.
-
, - ( ).
Access POL-DAT.MDB : tblPelates tblPoliseis , ( 4).
3 Microsoft Access ACCDB ( ACCess DataBase), -
MDB ( Microsoft DataBase), ), , , ..
3
4
5
1
V IEK 2013
igaviotis@gmail.com 27--14 . 3
Access POL-APP.MDB POL-DAT.MDB.
( , , , ), . , .
"" ( 6) - , . ' ', Visual Basic, Docmd.OpenForm Docmd.OpenReport Click . .
file server . ( POL-DAT.MDB) . ( POL-APP.MDB) ( ' ') "" .
1.3 /
'' /. (Local Area Network, LAN) "" , Microsoft Windows Server. (), Microsoft
SQL Server,
Oracle,
MySQL. , ' () database server. , .
, , , ..
(data access API, API Application Programmer's Interface). , SQL Server Express, Visual Basic ADO (ActiveX Data Objects ). SQL.
: , . , . , . , , , .
/ . . , , .
6
7
8 /
IEK 2013 V
. 4 27--14 igaviotis@gmail.com
2. - , .
Visual Basic 2010 Express - Microsoft.
2.1
'' (imperative program-ming), ( 1), - (visual programming) (), 4.
(component) , - . . ( , , ) - (, , ). Visual Basic - Toolbox ().
(properties). . - , , , . . , ., - , . : frmKyria, frmKyria.BackColor = Color.Yellow
(events). , , - .
VB: (-), .
2.2 Visual Basic
Visual Basic (VB): (Graph-ical User Interface, GUI), . , Visual Basic 2010 Express (command completion) . .
, , Basic ( 60!, 1) (object-oriented) 80 (Java, C++). , VB Microsoft Windows, Linux, Android, iOS.
, , , (virtual machine). - (interpreted) -, (compiled) .
VB 90 -, . !
4 / (= -
) . .
INPUT a, b
apotel = a+ b
PRINT a, b, apotel
1 Basic
1 ( www.tiobe.com)
V IEK 2013
igaviotis@gmail.com 27--14 . 5
(Form) frm
Label lbl
TextBox txt
Button btn
ComboBox cbo
RadioButton rdo
DateTimePicker dtp
2
2.3
. (project) Windows Forms Application HelloProgram. , - , :
Toolbox
Design
Solution Explorer , , ,
Properties /
() - frmHello. Solution Ex-plorer - FileName.
- -, ., . -, ( -) ( ). - frm.
Design Text ' !', BackgroundImage BackgroundImageLayout = Zoom . (bold) - Properties. , - -
-:
, , .
() F5 ( 10). , ; , .
Label Name = lblOnoma Text = ' ;' Font, ForeColor, BackColor , Appearance. , TextBox Name = txtOnoma Button Name = btnHello.
- ( ). - (
9 o VB
10 VB
IEK 2013 V
. 6 27--14 igaviotis@gmail.com
). . . .
- main. VB .
, . - , 2. , -. frmHello ( 1) ( 2) . 3-4 . , .
, . . - btn_Click frmHello.
. Public Private . frmHello (Public), . , btnHello_Click , . , frmHello, .
txtOnoma.Text. - , ( , - C++, 5.
, . , . - 3, Now .Hour .
Me.Close() btnTerma Text = '' . , - , Application.Exit().
. 3 - VB.
VB . -, - Visual Studio.
5 , ,
( Smalltalk Java) ( BlueJ).
1 Public Class frmHello 2 Private Sub btnHello_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHello.Click
3 Beep() 4 MessageBox.Show(" " & txtOnoma.Text) 5 End Sub 6 End Class
2 Click
Dim intOra As Integer, strXaire As String intOra = Now.Hour If intOra < 12 Then strXaire = "" ElseIf intOra < 20 Then strXaire = "" Else strXaire = "" End If MessageBox.Show(strXaire & " " & txtOnoma.Text)
3
Integer int
Double dbl
String str
/ Date dtm
Char chr
/ Boolean bln
3 VB
V IEK 2013
igaviotis@gmail.com 27--14 . 7
2.4
. 1000 .
. , , .
, project LexoMetro, frmLexo :
lblKeimeno Caption = ' :'
txtKeimeno MultiLine ScrollBars = Both
(RadioButtons) rdoLexeis rdoXaraktires, , Checked = True.
lblMetritis, BorderStyle = FixedSingle.
, 11. , . . .
- txtKeimeno, - , , TextChanged - txtKeimeno frmLexo ( - 4). - - txt-txtKeimeno. 4-19.
- (syntax-directed editor) - . , (indentation) - , , ..
IfElseEnd If , (- Checked). : 18 Len ( 4) lblMetritis . : txtKeimeno . .Text , Len .
5-16 . , - ( 6). 7 intPos ( Mid 4). booInWord
1 Public Class frmLexo 2 Private Sub txtKeimeno_TextChanged(ByVal sender As System.Object, 3 ByVal e As System.EventArgs) Handles txtKeimeno.TextChanged 4 If rdoLexeis.Checked Then ' 5 Dim blnInWord As Boolean, intLexeis As Integer 6 For intPos As Integer = 1 To Len(txtKeimeno.Text) 7 If Mid$(txtKeimeno.Text, intPos, 1) = " " Then 8 blnInWord = False 9 Else
10 If Not blnInWord Then 11 blnInWord = True 12 intLexeis += 1 ' 13 End If 14 End If 15 Next intPos 16 lblMetritis.Text = intLexeis 17 Else ' 18 lblMetritis.Text = Len(txtKeimeno.Text) 19 End If 20 End Sub 21 End Class
4 / (' )
Len(s) s s = 'abcd' Len(s) 4
Left(s,n) n s Left(s, 2) 'ab'
Right(s, n) Right(s, 2) 'cd'
Mid(s, n,m) m n Mid(s, 2, 2) 'bc'
4
11
IEK 2013 V
. 8 27--14 igaviotis@gmail.com
, . , - . , , intLexeis.
(debugging) VB. , (breakpoint) . , , . - F8 . -, F5 - .
, . . , . .