A voir également:
- Vérification le contenue d'une chaine
- Chaine tnt gratuite sur mobile - Guide
- Verification windows 11 - Guide
- Chaine radio - Télécharger - Médias et Actualité
- Verification lien internet - Guide
- Plus de chaine tv - Guide
1 réponse
* public bool IsNumeric(string Nombre)
* {
* int i=0;
* int nb=0;
* bool ok=false;
* char[] tabNombre;
* char[] unNb;
* tabNombre=Nombre.ToCharArray(0,Nombre.Length);
* for (i=0;i<Nombre.Length;i++)
* {
* ok=false;
* while ((nb<10)&&(ok==false))
* {
* unNb=Convert.ToString(nb).ToCharArray(0,1);
* if (tabNombre[i]==unNb[0])
* {
* ok=true;
* nb=0;
* }
* else
* {
* if ((i==0)&&(tabNombre[i]=='-'))
* {
* ok=true;
* nb=0;
* }
* else
* {
* ok=false;
* nb++;
* }
* }
* }
* }
* return ok;
* }
private bool IsAlpha(string ch)
{
Regex myRegex = new Regex("^[a-zA-Z' ']+$", RegexOptions.IgnoreCase);
return myRegex.IsMatch(ch);
}
private bool IsNum(string ch)
{
Regex myRegex = new Regex(@"^\d+$", RegexOptions.IgnoreCase);
return myRegex.IsMatch(ch);
}
mnt j'ai un autre probléme j'ai fait une requete
conn.Open();
string req = "INSERT INTO documents (doc_nom,doc_dat_ajout,doc_domaine,doc_type,doc_source_id) values ('" + fn + "','" + dateDebut.Value + "','" + domaine.Text + "','" + type.Text + "','" + source + "')";
SqlCommand cmd = new SqlCommand(req, conn);
cmd.ExecuteNonQuery();
conn.Close();
ce qui me donne l'erreur suivant
System.Data.SqlClient.SqlException: Incorrect syntax near 'instruction'.
Unclosed quotation mark after the character string ')'. y a t il une solution et merci d'avance.