Question : Access database update help

I inherited a database which has strings where it should have boolean or numbers. Trying to set a column which is 'TEXT' to a number (Also as text, later will convert the datatype).

Getting an error.
------------------------------------Microsoft JET Database Engine error '80040e10'

No se han especificado valores para algunos de los parámetros requeridos.

/plazatorros_bil_v01/VD_Editor/Leg_Diestros/diestros_Cp.asp, línea 21

--------------------------------------

Dim stFr, stTo

stFr = "t"
stTo = "1"

MyConn_Legacy.execute("UPDATE Leg_toreros SET tor_tipo = '" & stTo & "' WHERE tor_tipo = " & stFr & "; ") '<< línea 21


Any ideas

A

Answer : Access database update help

Try this:

MyConn_Legacy.Execute ("UPDATE Leg_toreros SET tor_tipo = " & Chr(34) & stTo & Chr(34) & " WHERE tor_tipo = " & Chr(34) & stFr & Chr(34) & "; ")


mx
Random Solutions  
 
programming4us programming4us