0% found this document useful (0 votes)
22 views

Database Programming With VB: Process & Knowledge Management Lab

This document discusses database programming with VB. It covers ActiveX Data Objects (ADO) and Open Database Connectivity (ODBC) for connecting to and querying databases. It provides code examples for connecting to a database and retrieving records using ADO and iterating through a recordset. It also demonstrates configuring an ODBC data source and using it to connect. The document announces a recruitment meeting for research participation in the Process & Knowledge Management Lab.

Uploaded by

midhungbabu88
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Database Programming With VB: Process & Knowledge Management Lab

This document discusses database programming with VB. It covers ActiveX Data Objects (ADO) and Open Database Connectivity (ODBC) for connecting to and querying databases. It provides code examples for connecting to a database and retrieving records using ADO and iterating through a recordset. It also demonstrates configuring an ODBC data source and using it to connect. The document announces a recruitment meeting for research participation in the Process & Knowledge Management Lab.

Uploaded by

midhungbabu88
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

Database programming with VB

Process & Knowledge Management Lab.

POSTECH I.M.E. Process & Knowledge Management Lab.


Contents

 ADO (ActiveX Data Objects)


 ODBC (Open DataBase Connectivity)
 Database programming with VB

POSTECH I.M.E. Process & Knowledge Management Lab.


ActiveX Data Objects

 ADO
 MS 의 데이터베이스 관련 API
 관계형 혹은 비관계형 데이터베이스에 대해 똑같은 인터페이스
제공

POSTECH I.M.E. Process & Knowledge Management Lab.


ActiveX Data Objects

 ADODB.Connection
 Open
 Execute

 ADODB.Recordset
 Open
 Fields
 MoveNext/Previous..
 EOF
 BOF

POSTECH I.M.E. Process & Knowledge Management Lab.


ActiveX Data Objects

 ADODB.Connection

Dim adoCon As New ADODB.Connection


adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\univdbchpt3
A2000.mdb;"

 ADODB.Recordset

Dim rs As New ADODB.Recordset


Dim strSSN As String
rs.Open ("SELECT STDSSN FROM STUDENT"), adoCon, adOpenStatic
Do While rs.EOF = False
strSSN = Trim(rs.Fields("STDSSN"))
lstSSN.AddItem (strSSN)
rs.MoveNext
Loop

POSTECH I.M.E. Process & Knowledge Management Lab.


ActiveX Data Objects

POSTECH I.M.E. Process & Knowledge Management Lab.


실습

POSTECH I.M.E. Process & Knowledge Management Lab.


POSTECH I.M.E. Process & Knowledge Management Lab.
Open DataBase Connectivity

POSTECH I.M.E. Process & Knowledge Management Lab.


ODBC 설정

POSTECH I.M.E. Process & Knowledge Management Lab.


ODBC 설정

POSTECH I.M.E. Process & Knowledge Management Lab.


ODBC 사용

 직접 연결
 adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=
C:\univdbchpt3A2000.mdb;“

 ODBC 연결
 adoCon.Open "DSN=student;”

POSTECH I.M.E. Process & Knowledge Management Lab.


과제

 실습한 예제 프로그램 완성하기 (Reset / Insert / Update /


Delete 버튼 )
 ODBC 로 연결할 것
 다음 주 실습 시간에 점검

POSTECH I.M.E. Process & Knowledge Management Lab.


Announcement

 PKM 연구실 연구참여생 모집


 설명회
– 11 월 22 일 ( 목 ) 오후 4 시 15 분
– 공학 4 동 307 호 회의실
 설명회 후 식사 제공

POSTECH I.M.E. Process & Knowledge Management Lab.

You might also like