Click here to Skip to main content
15,887,827 members
Home / Discussions / Mobile
   

Mobile

 
GeneralRe: Waiting for a protractor code(windows phone) Pin
chinakknd20-Feb-14 1:09
chinakknd20-Feb-14 1:09 
GeneralRe: Waiting for a protractor code(windows phone) Pin
Sunasara Imdadhusen23-May-14 0:17
professionalSunasara Imdadhusen23-May-14 0:17 
AnswerRe: Waiting for a protractor code(windows phone) Pin
Aavishkar Jugwanth16-Feb-15 1:53
Aavishkar Jugwanth16-Feb-15 1:53 
QuestionMODBUS TCP with multiple nodes Pin
Member 102964189-Feb-14 1:08
Member 102964189-Feb-14 1:08 
AnswerRe: MODBUS TCP with multiple nodes Pin
Richard MacCutchan9-Feb-14 1:42
mveRichard MacCutchan9-Feb-14 1:42 
GeneralRe: MODBUS TCP with multiple nodes Pin
Sunasara Imdadhusen23-May-14 0:19
professionalSunasara Imdadhusen23-May-14 0:19 
Questionloosing files and wifi history when rebooting NORDICID windows CE 6.0/-handheld-/ Pin
Member 105062154-Feb-14 23:42
Member 105062154-Feb-14 23:42 
Questionsaving to sql from windows imbedded CE 6.0 using vb.net 2008 Pin
Member 105062154-Feb-14 1:06
Member 105062154-Feb-14 1:06 
Hello. I have an an application on a handheld that reads rfid and stores the result in a txt file. all good so far. i read thefile in order to save it into sql server. but i am having a big error.
Here is my code. Is there anything wrong with it?
The error is in the comment. because it's a long error.
VB
Public Function ChangeFormat(ByVal dtm As String) As Date
        Dim temp As String = ""
        temp = Mid(dtm, 4, 2) & "/"
        temp = temp & Mid(dtm, 1, 2) & "/"
        temp = temp & Mid(dtm, 7, 4) & " "
        temp = temp & Mid(dtm, 12)
        ChangeFormat = CDate(temp)
    End Function
    Private Sub cmdimport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdimport.Click
        Try
            If connect2008() = True Then
                If MsgBox("Do you want to export data to server?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
                    Dim _cmd As New SqlCommand("", connchip)
                    Dim i As Integer = 0
                    Dim strsql2 As String = ""
                    Dim tmp As String = ""
                    Dim ln() As String
                    Dim f As New System.IO.StreamReader("\ticketpro\export\" & Format(Now, "yyyyMMdd") & "HH.txt")
                    While Not f.EndOfStream
                        tmp = f.ReadLine
                        ln = tmp.Split(",")
                        strsql2 = "insert into handheld ("
                        strsql2 = strsql2 & "dat, "
                        strsql2 = strsql2 & "ticketnum, "
                        strsql2 = strsql2 & "stationid, "
                        strsql2 = strsql2 & "hhid, "
                        strsql2 = strsql2 & "status) values ("
                        strsql2 = strsql2 & "'" & ChangeFormat(ln(1)) & "', "
                        strsql2 = strsql2 & "'" & ln(2) & "', "
                        strsql2 = strsql2 & ln(0) & ", "
                        strsql2 = strsql2 & ln(4) & ", "
                        strsql2 = strsql2 & "'" & ln(3) & "') "
                        _cmd = New SqlCommand(strsql2, connchip)
                        _cmd.ExecuteNonQuery()
                    End While
                    _cmd.Dispose()
                    f.Close()
                    f.Dispose()
                    connchip.Close()
                    MsgBox("Export Done")
                Else
                    MsgBox("Server not in range")
                End If
            End If
        Catch ex As Exception
            MsgBox("import error " & ex.ToString)
        End Try
    End Sub
    Public Function connect2008() As Boolean
        connect2008 = False
        Dim path As String
        Dim database As String
        Dim temp As String = ""
        Dim temp2(15) As String
        Dim server As String
        Dim FileReader As StreamReader
        FileReader = New StreamReader("\ticketpro\chip.txt")
        temp = FileReader.ReadToEnd()
        temp2 = Split(temp, ",")
        FileReader.Close()
        database = temp2(8)
        server = temp2(7)
        path = "Data Source=eazzi-pc\SQLEXPRESS2012;Initial Catalog=ticketprozaarour; User Id=system; Password=startup;"
        Try
            connchip = New SqlConnection(path)
            connchip.Open()
            connect2008 = True
        Catch ex As Exception
            connect2008 = False
            MsgBox("error in function connect 2008")
        End Try
    End Function
      Private Sub TImageButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TImageButton1.Click
        Me.Close()
    End Sub
End Class


One more thing. he handheld is connected to wifi. and the pc eazzi-pc is connected to the same wifi.
AnswerRe: saving to sql from windows imbedded CE 6.0 using vb.net 2008 Pin
Member 105062154-Feb-14 2:12
Member 105062154-Feb-14 2:12 
GeneralRe: saving to sql from windows imbedded CE 6.0 using vb.net 2008 Pin
Member 105062154-Feb-14 23:30
Member 105062154-Feb-14 23:30 
QuestionFlash Banner in Mobile Pin
Fcode-20143-Feb-14 21:25
Fcode-20143-Feb-14 21:25 
AnswerRe: Flash Banner in Mobile second repost Pin
Richard MacCutchan3-Feb-14 22:05
mveRichard MacCutchan3-Feb-14 22:05 
AnswerRe: Flash Banner in Mobile Pin
Shameel3-Feb-14 22:46
professionalShameel3-Feb-14 22:46 
GeneralRe: Flash Banner in Mobile Pin
Fcode-20143-Feb-14 22:49
Fcode-20143-Feb-14 22:49 
QuestionRe: Flash Banner in Mobile Pin
thatraja4-Feb-14 2:22
professionalthatraja4-Feb-14 2:22 
GeneralRe: Flash Banner in Mobile Pin
Sunasara Imdadhusen23-May-14 0:20
professionalSunasara Imdadhusen23-May-14 0:20 
QuestionWindow mobile development Pin
ravikhoda3-Feb-14 19:12
professionalravikhoda3-Feb-14 19:12 
AnswerRe: Window mobile development Pin
thatraja3-Feb-14 20:18
professionalthatraja3-Feb-14 20:18 
GeneralRe: Window mobile development Pin
ravikhoda3-Feb-14 20:20
professionalravikhoda3-Feb-14 20:20 
GeneralRe: Window mobile development Pin
Sunasara Imdadhusen26-Apr-14 0:56
professionalSunasara Imdadhusen26-Apr-14 0:56 
QuestionHow to merge mp3 files into one in windows phone 8 Pin
Abdul Rahman Hamidy3-Feb-14 4:28
Abdul Rahman Hamidy3-Feb-14 4:28 
QuestionHow to add pivot item to wp8 Pin
Abdul Rahman Hamidy28-Jan-14 20:10
Abdul Rahman Hamidy28-Jan-14 20:10 
QuestionHow to draw a straight line 3 cm?( windows phone) Pin
chinakknd11-Jan-14 14:39
chinakknd11-Jan-14 14:39 
AnswerRe: How to draw a straight line 3 cm?( windows phone) Pin
Richard MacCutchan11-Jan-14 22:17
mveRichard MacCutchan11-Jan-14 22:17 
QuestionTextBlock does not display all Text (Windows Phone 8) Pin
Abdul Rahman Hamidy3-Jan-14 19:12
Abdul Rahman Hamidy3-Jan-14 19:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.