'=============================선언부
Public cnDataFile As InTheHand.AdoceNet.Connection
Friend rsTables As InTheHand.AdoceNet.Recordset
'============================= adoce3.1이 깔려있는지 확인
Try
cnDataFile = New InTheHand.AdoceNet.Connection
Catch ex As TypeLoadException
MessageBox.Show("Error: ADOCE 3.1 is not installed on your device.")
'close the application
Application.Exit()
End Try
'=================================DB가 열려있으면 닫아주는 부분
'if the connection is open, close it first
If cnDataFile.State = ConnectionState.Open Then
cnDataFile.Close()
End If
'=================================DB경로 설정하여 Open
cnDataFile.Open("\Program Files\SmartDeviceApplication3\address.cdb")
'=================================Open recordset
'open recordset to MSysTables table
rsTables = New InTheHand.AdoceNet.Recordset
rsTables.Open(ComboBox3.SelectedItem, cnDataFile)
'loop while there are still records
While Not rsTables.EOF
If [조건] Then
[어쩌구 저쩌구]
End If
rsTables.MoveNext()
End While
'=============================== Close recordset
rsTables.Close()
cnDataFile.Close()
댓글 없음:
댓글 쓰기