VB: MS ACCESS

a Microsoft Visual Basic 6.0 program in creating a simple connection with MS Access database

► steps:

1. MS ACCESS

1.1 open Microsoft Office Access

1.2 on the Menu bar,
click on File --> New

1.3 on the right pane,
click on 'Blank database...'

1.4 on the 'File New Database' window
enter a database name (example: wangs)
click on the Create button

1.5 click on 'Create table by entering data'

1.6 rename Field1 to 'username'
rename Field2 to 'passsword'

1.7 enter data

1.8 click on the Save button

1.9 enter a 'Table Name' (example: wlogin)

1.10 click on 'Ok'

1.11 Do you want to create a primary key now?
click on the 'Yes' button




2. MS VISUAL BASIC




2.1

2.1.1. open Microfosoft Visual Basic 6.0

2.1.2. create a new VB project

2.1.3. on the Menu bar,
click Project --> Components

2.1.4. on the Controls tab,
make a checkmark for 'Microsoft ADO Data Control 6.0 (OLEDB)'

2.1.5. place an ADODC object on the form (Adodc1)

2.1.6. right click ADODC object

2.1.7. click on 'ADODC properties'
on the General Tab
choose Use Connection String
click on the 'Build' button
on the Provider Tab
choose 'Microsoft Jet 4.0 OLE DB Provider'
click on the 'Next' button
on the Connection Tab
click on the '...' button
delete Admin
uncheck the 'Blank password' option
click on the 'Test Connection' button
Test Conection Succeeded, click on the 'Ok' button
click on the 'Ok' button
on the RecordSource Tab
Command Type: 2-adCmdTable
Table or Stored Procedure Name: (wlogin)
click on the 'Ok' button




2.2

2.2.1. place a textbox on the form

2.2.2. Textbox Properties:
Data Source: (Adodc1)
Data Field: (choose a table)

2.2.3. Run project

_________________________________________________________________
  .  cdo bloggers   .  my digital corner   .  sacha chua   .  the oatmeal   .  toxel.com   . 
  .  Hotels & Resorts Worldwide   .