Public Function Update_RetailerData() As Double
Dim myConnection As SqlConnection
Dim myCommand As SqlCommand
Dim icount As Integer
Dim strSQL As String = ""
Dim connStr As String
myConnection = GetConnectCRLimit("REMOTE")
Form1.txtEncryptCode.Text & "','" & frmCurrentBalance.lblTopUp.Text & "')"
strSQL = "UPDATE RetailerBalance SET BoothID='" & BoothNo & "'WHERE GrandTotal='" & Format(CDbl(GrandTotal), "0.00") & "'"
Form1.txtBoothID.Text & "'AND AuthorizationCode='" & Form1.txtEncryptCode.Text & "'"
myCommand = New SqlCommand(strSQL, myConnection)
icount = myCommand.ExecuteNonQuery()
1) if GrandTotal is a float in the DB, do not surround the number with quotes in the SQL sentence
2) Searching on a float is generally not a good idea, because the internal precission representation of exponent and mantissa.
Please, can you be so kind to indicate what is the contents of strSQL before executing the SQL command?