No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

MySQLUtils.cs

Description du code

MySQLUtils.cs est un fichier du projet BiblioBrol.
Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/src/.

Projet BiblioBrol :

Gestion de media en CSharp.

Pour plus d'infos, vous pouvez consulter la brève analyse.

Code source ou contenu du fichier

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Data.Common;
  5. using System.Data;
  6.  
  7. namespace be.gaudry.bibliobrol.model.dao.mysql
  8. {
  9. /// <summary>
  10. /// Static methods to use dates into Access SQL request
  11. /// </summary>
  12. public static class MySQLUtils
  13. {
  14. /// <summary>
  15. /// Gets the formated access date to fill into a SQL request string
  16. /// </summary>
  17. /// <param name="dateTime">(DateTime) dateTime to insert</param>
  18. /// <returns>(String) access SQL formated date string</returns>
  19. public static String getAccessDate(DateTime dateTime)
  20. {
  21. StringBuilder str = new StringBuilder("#");
  22. str.Append(dateTime.Month);
  23. str.Append("/");
  24. str.Append(dateTime.Day);
  25. str.Append("/");
  26. str.Append(dateTime.Year);
  27. str.Append("#");
  28. return str.ToString();
  29. }
  30. /// <summary>
  31. /// Changes null to empty strings (null values are not allowed in the db)
  32. /// and replaces ' by '' to avoid string errors
  33. /// </summary>
  34. /// <param name="s"></param>
  35. /// <returns></returns>
  36. public static string escapeAndTrim(string s)
  37. {
  38. return(s==null)?"":s.Replace("'", "''").Trim();
  39. }
  40. }
  41. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/src/model/dao/mysql/utils/ 
IcôneNomTailleModification
Pas de sous-répertoires.
IcôneNomTailleModification
| _ Répertoire parent0 octets1720201257 05/07/2024 19:40:57
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/src/model/dao/mysql/utils/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csMySQLUtils.cs1.35 Ko31/10/2018 18:33:23-refusé-

Utilisation de l'explorateur de code

  • Navigation :
    • Un clic sur une icône de répertoire ouvre ce répertoire pour en afficher les fichiers.
    • Lorsque le répertoire en cours ne contient pas de sous-répertoires il est possible de remonter vers le répertoire parent.
    • La structure de répertoires en treetable (tableau en forme d'arborescence) n'est plus possibledans cette version.
    • Un clic sur une icône de fichier ouvre ce fichier pour en afficher le code avec la coloration syntaxique adaptée en fonction du langage principal utilisé dans le fichier.
  • Affichage :
    • Il est possible de trier les répertoires ou les fichiers selon certains critères (nom, taille, date).
  • Actions :
    • Les actions possible sur les fichiers dépendent de vos droits d'utilisateur sur le site. Veuillez activer le mode utilisateur pour activer les actions.

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 16/10/2009, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/cs-bibliobrol-source-rf-model/dao/mysql/utils/MySQLUtils.cs.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.