VB5Transfer Data to the Device
Private Sub cmdStart_Click()
   Dim result As Long
   result = DESKTOPTODEVICE("d:\vbpj\inventory.mdb", _
      "truckinv..", False, True, ")
   If result <> 0 Then
      MsgBox "An error occurred transferring the " & _
         "data: " & result
   End If
   MsgBox "Done!"
End Sub

Private Sub cmdFinish_Click()
   Dim result As Long
   result = DEVICETODESKTOP("d:\vbpj\inventory.mdb", _
      "truckinv..", False, True, ")
   If result <> 0 Then
      MsgBox "An error occurred transferring the " & _
         "data: " & result
   End If
   MsgBox "Done!"
End Sub
Listing 5 The cmdStart event transfers data to the device. If the table is not present in the device, the API creates it first. The cmdFinish event transfers the data back to the desktop.