Bonjour
Un conseil clair, évite d'utiliser des saisies directement sans les controler auparavant.
Tu peux faire comme moi, utiliser une fonction :
public function GetValue(byval pValue as String) as string
if pvalue is nothing then pvalue=""
return """"+pvalue.replace("""","""""")+""""
end function
public function GetValue(byval pValue as integer) as string
return cstr(pvalue)
end function
...
Et comme ça ta chaine devient :
Req = "INSERT INTO Planim (NO1,NO2,SU,R,T,NO,ROUL,MI) VALUES (" & _
GetValue(No1) & "," & GetValue(Me.txtNo2.Text) & "," & GetValue(Me.txtSu.Text) & "," & GetValue(Me.cbxR.Text) & "," & _
GetValue(T) & "," & GetValue(Me.txtNo.Text) & "," & GetValue(Roul) & "," & GetValue(Me.txtMi.Text) & ")"
En plus cela t'obligera a typer fortement tes variables.
Le fer à souder a besoin d'une panne pour fonctionner.
VB (6, .NET1&2), C++, C#.Net1
Mon site