La copie de code est la suivante:
'Convertir les chaînes au format de l'instruction SQL à base de données
'-------------------------------------------------
Fonctionalstr2database (str, strype)
DimstrTemp: strTEmp = str
SelectCasestrType
Cas""
Cas "num"
strTEmp = clng (strTEmp)
Case "String" 'pas de garniture
StrTemp = remplacer (strTEmp, "'", "' '")
Case "str_br" 'pas de garniture, convertir le retour du chariot à <br>, généralement utilisé pour l'entrée de texte multi-lignes
StrTemp = remplacer (remplacer (strTEmp, "'", "' '"), vbcrlf, "<br>")
Case "str_trim" '
StrTemp = Remplacer (Trim (StrTemp), "'", "' '")
Cas "nums"
StrTemp = TRIM (StrTemp)
StrTemp = remplacer (strTEmp, ")", "")
StrTemp = remplacer (strTEmp, "(", "")
StrTemp = remplacer (strTEmp, "'", "")
StrTemp = remplacer (strTEmp, ";", "")
strTemp = remplacer (strTEmp, "", "")
strTemp = remplacer (strTEmp, "ou", "")
strtemp = remplacer (strTEmp, "et", "")
StrTemp = remplacer (strTEmp, "Delete", "")
StrTemp = remplacer (strTEmp, "sélectionner", "")
StrTemp = Remplace (StrTemp, "Exec", "")
StrTemp = remplacer (strTEmp, "Update", "")
StrTemp = remplacer (strTEmp, "sélectionner", "")