updating MySQL with a string variable

Last post 05-08-2008 2:56 PM by spiveygb. 0 replies.

Sort Posts:

  • updating MySQL with a string variable

    05-08-2008, 2:56 PM
    • Loading...
    • spiveygb
    • Joined on 05-02-2006, 11:11 AM
    • Posts 17

    This is driving me nuts so please stop the insanity.Big Smile  I'm collecting a error message and setting it to variable "strError."  I then update a datatable.  Finally, I batch update a MySQL database.  The issue is that although strWMSErrMsg has the correct error message the database field is blank.  If I change strWMSErrMsg to: "TEST" & strError then the field shows TEST.  So it's like it doesn't like the contents in the string variable.

      

    1    If intStartPos > 0 And intEndPos > 0 Then
    2                                        intStringLength = intEndPos - intStartPos
    3                                        Dim strError As String = Trim(XMLcontent.Substring(intStartPos + (strStartSearchString.Length), (intStringLength - strEndSearchString.Length + 1)))
    4                                        strWMSErrMsg = strError
    5                                    End If
    6    
    7    If strWMSErrMsg = "" Then
    8                                    strWMSErrMsg = "The WMS response did not validate. However, no <ServiceException> tag was found."
    9                                End If
    10                               'update the dt
    11                               updateDataTable(aDataRow, httpStatus, False, strWMSErrMsg) 
    12   
    
     
    1    Private Sub updateDataTable(ByRef drData As DataRow, ByVal intHttpCode As Integer, ByVal blnWMSStatus As Boolean, ByVal strMsg As String)
    2    
    3            drData("HttpStatus") = intHttpCode
    4            drData("WMSGetCapStatus") = blnWMSStatus
    5            drData("WMSGetCapErrMsg") = strMsg
    6    
    7        End Sub
    
      
     
Page 1 of 1 (1 items)