Hi at all,
I need to copy a file from a device connected with USB throw activesync ( version 4.5.5096.0 ). Now, the state is:
1. ActiveSync connected;
2. A little VB.NET software from the PC have this code:
Dim rr As New OpenNETCF.Desktop.Communication.RAPI
rr.ActiveSync.AutoConnect = True
rr.ActiveSync.ConnectAsGuestOnly = True
rr.ActiveSync.ConnectNow()
Debug.Print(rr.ActiveSync.Version)
rr.CopyFileOnDevice("c:\filefromdevice.txt", "test.txt", True)
rr.CopyFileFromDevice(SdfToDesktop, "test.txt", True)
Catch ERRORE As OpenNETCF.Desktop.Communication.RAPIException
frmMain.Cursor = Cursors.Default
MsgBox(ERRORE.Message)
Exit Sub
End Try
Dim cConn As String
cConn = "DATA SOURCE = " & SdfToDesktop
Try
cnn.ConnectionString = cConn
cnn.Open()
Catch ex As System.Exception
MsgBox("Error open sdf: " & vbCrLf & ex.Message)
cnn.Close()
cnn.Dispose()
Exit Sub
End Try
Dim myReader As System.Data.SqlServerCe.SqlCeDataReader
Dim cmd As System.Data.SqlServerCe.SqlCeCommand = cnn.CreateCommand
cmd.CommandText = "select * FROM tblWork"
myReader = cmd.ExecuteReader()
Debug.Print(myReader.FieldCount)
' to be continue....with your code
End Sub
But I cannot copy any file... Can you help me???
Best Regards
kL0d3