Main(string[])' possède une signature erronée pour un point d'entrée
bonjours a tous ,
Je développe sur VS2010
ce programme m'affiche l'erreur (....Program.Main(string[])' possède une signature erronée pour un point d'entrée). qlqun me dit ou est l'erreur svp, j'ai chercher et j'ai pas trouvé.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
| using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
namespace GetTypeColoneRequete2
{
class Program
{
public static string Main(string[] args)
{
//
// Liste des types
string strListeType = "";
string strRequete;
// récupération Paramètres **********************************
string spConnStr = "";
string spRequete = "";
string spResultat = "";
if (args != null && args.Length > 1)
{
spConnStr = args[0];
spRequete = args[1];
}
// Fin récupération Paramètres **********************************
try
{
// Chaine de connexion
string connectString = spConnStr;
// Objet connection
SqlConnection vlconnection = new SqlConnection(connectString);
// Ouverture
vlconnection.Open();
// requete Select
strRequete = spRequete;
SqlCommand command = new SqlCommand(strRequete, vlconnection);
// Objet DataReader
SqlDataReader reader = command.ExecuteReader();
//
Object[] row = null;
strListeType = "";
reader.Read();
if (row == null) row = new Object[reader.FieldCount];
reader.GetValues(row);
for (int i = 0; i < row.GetLength(0); i++)
{
strListeType += reader.GetDataTypeName(i) + "$$";
}
spResultat = strListeType;
// Fermeture reader
reader.Close();
// Fermeture
vlconnection.Close();
//Console.WriteLine(spResultat);
return spResultat;
}
catch (Exception ex)
{
//System.Diagnostics.Debug.WriteLine("Erreur : " + ex.ToString());
//Console.WriteLine(ex.ToString() + "-----------------------------------" + ex.Message);
return ex.ToString();
}
}
}
} |
merci d'avance .