Question : MS Access SQL Inserting string value that contain a colon

Hello

I'm trying insert / update value containing a colon from vb.net
The field in the access 2003 db is type of string

and the value im trying to insert  myval = 88:93
i keep getting an exception = can not convert to double

        Public Shared Sub UpdateDeviceDATA(ByVal GearWeelBefore As String, ByVal GearWeelAfter As String)  

_sSql = "UPDATE DeviceMeters SET " & _
"GearWeelBefore = '" & GearWeelBefore & "' , GearWeelAfter = '" & GearWeelAfter & "' Where DeviceID = '" & DeviceID & "' "
            DalBase.ExecuteNonQuery(_sSql)
        End Sub

what i am missing

Answer : MS Access SQL Inserting string value that contain a colon

Because your code is not in Code area, it is difficult to see the use of quotes. Here is a query i would use in such a scenario

1:
_sSql = "Update [DeviceMeters] Set [GearWeelBefore] = '" & Gvalue1 & "', [GearWeelAfter]='" & Gvalue2 & "' Where [DeviceID] = '" & dID & "'"
Random Solutions  
 
programming4us programming4us