Excuter une requête SQL qui retourne un seul enregistrement

Bonjour,

j'utilise la version 2003 de .net. Je travaille avec une base de donnes Sql qui est charg dans un datagrid.

Je voudrais pouvoir lorsque je fais la slection de certaines lignes, pouvoir les afficher dans mon datagrid.

J'ai aussi ce code qui me genere une erreure lorsque je veux pouvoir executer une requête sql me permettant de retourner une seul enregistrement :

publicstatic Dictionary<string,string> ObtenirEnregistrement(string requete)

{

return ObtenirEnregistrement(requete, ConfigurationManager.ConnectionStrings["ConnectionString"].ToString());

}

Comment modifier cette mthode afin qu'elle puisse fonctionne correctement?

Merci d'avance...

[1079 byte] By [misscricri] at [2007-12-29]
# 1
Hello. Please post your question in English.
PeterRitchie at 2007-9-4 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...
# 2
Hi!

I am using the 2003 version of .NET. I work with a SQLdatabase that is loading in a datGrid.

I would want to be able when I do the selection of certain rows, to be able to only post the selecting rows in my datagrid.

I have also this code which give me an error when i want to execute an sql querry allowing me to return only one recording

public static Dictionary<string, string> ObtenirEnregistrement(string requete)

{

return ObtenirEnregistrement(requete, ConfigurationManager.ConnectionStrings["ConnectionString"].ToString());

}

How can i do to modify this function so that it can work correctly?

Thank you!


misscricri at 2007-9-4 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...