Data from gprs to mysql

Hello Gurus,

I am working on a project where I want to send the longitude and latitude through GPRS to remote server.
The lon and lat is sending by gprs shield successfully and I am able to see the data send through socketTest software.

Now I want to save the data send my GPRS to mysql database.
I have written the sketch at .net framework, but the data not saved at mysql Database, when the data send by GPRS over the internet.

Whereas I am able to save the data to mysql DB when I connected thtough com4 port using USB cable.
I am uploading the sketch I have written at .net.

Please advice on this.

Dim readserialdata As Double
        Dim mystring As String
        Dim retstring As String  'Getting the actual value wihout CIPSEND text
        Dim lat As Double
        Dim lon As Double
        Dim sqlquery As String = "insert into `location`.`tabloc` values(" & Trim(lat) & "," & Trim(lon) & ")"
        If myport.IsOpen Then
            readserialdata = myport.ReadExisting()  'Read data from Serial Port
            mystring = Convert.ToString(readserialdata)
            retstring = mystring.Substring(10)
            Dim splitstring As String() = retstring.Split(",")
            lat = Convert.ToDouble(splitstring(0))
            lon = Convert.ToDouble(splitstring(1))
            cmd = New MySqlCommand(sqlquery, cn)
        End If
With myport
            .BaudRate = 9600
            .PortName = "4001"
        End With