Sie sind auf Seite 1von 22

NANOSOFT

(GAME & SOFTWARE DESIGNING)


HNDEC-MTK & BIT-UOC
Damith92nano@gmail.Com
>>>>> CREATED BY-DAMITH WEERASUNDARA <<<<<<
53

Temporally Permanently
Ex-) Game High Score
If data is a variable, we can use Variable
Data Record sets
Method to storage data in memory.

EX-) Dim Age As bite


Public Salary As variant Using Database Using Spreadsheet Using Notepad

Using DAO Using ADO Using Data Grid


54

1) Field Name (Should be single name)


2) Filed Type (String Type for Character type, Number for numeric, Yes/No Type
for Boolean etc…)
3) Filed Size (According to the purposes)

Ex-)
• Table Name-STDATA.mdb • Save As-2000 Format, Because vb6 Developed by Microsoft In 2001.
55

• Table Name-STDATA.mdb • VB Interface

• Database Name-STUDENT.mdb

• File Path-
1) To Connect Database with VB we add Microsoft DAO 3.6 (DLL File) 56

Project-->Reference-->Microsoft DAO 3.6

2) Declaring Variables
Database and Record set always changing. (we edit, save, delete…). So these are variables.
We use a specific place to storage database in memory.
RAM

3) Connect with our Database Project.

4) Showing connected data.


5) Records move
57
58

• VB Interface

• Write codes for records move. (Early mentioned).change the


interface as follow. (NAME as NAME1 & NAME2).
59
Key field

****NOTE-
Regno textbox(txtr) tab index
shouldn’t equal to zero

****NOTE-
But you cannot write code like this for save or edit.
60

Adding data to combo box


1.Using list of property window

2.Using codes
Ex-1) Ex-2)

A Loop
61
Ex-3) Set database to vb and
write code like this
• Only 3 records display

Ex-4) • Countering how many records are


there…

• Then showing all data in record sets


62

Ex-1) One key field

Ex-2) Two key field

or

****NOTE-
You cannot take different type of field
as key field .
Ex-3) 63

• Add items to Field combo box using list box


64
65

• Two Key Fields


66

1) Add Microsoft FlexGrid Controller


Project-->Components-->Microsoft FlexGrid Controller 6.0

2) Right click on FlexGrid and select Properties. Change these as follows.

3) Change FlexGrid name as MS.

4) Add a Combo box, Change Name as cmbr • VB Interface


Open lesson 02 vb project and 67
edit these things
68

To separate specific type of field we use WHERE clause.

EX-1) Open the Lesson 01 VB Project. Then edit only this.

Then connected with civil records only and other records neglected.
69
Declaring variables for STSUB table.
Declaring variables for STINFO table.
Declaring variables for STMARKS table.
EX-2) Create 3 databases. STMARKS table records should be empty.
70

VB Interface
a Key Field 71

WHERE clause.
72
Three Key Fields
VB 6.0
1.VB Basic (1st Semester) 2.Data Storage (2nd Semester)
I. Introduction I. Introduction
II. Standard Names II. Database
III. Simple Codes III. What is .EXE?
IV. Print Method IV. What is DLL?
V. What is ADO & ODA?
V. Numerical Calculations
VI. What is OLE?
VI. Variable Method
VII. Lesson 1
VII. Conditional Statements
VIII. Lesson 2
VIII. Message Boxes
IX. Lesson 3
IX. Optional Buttons X. Lesson 4
X. Loops XI. Lesson 5
XI. Functions XII. Data grid
XIII. Lesson 6

Full note eka passe danm mchn…….

Das könnte Ihnen auch gefallen