[Debutant] probleme : remplir GridView
Salut
j'ai ce code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
String CString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=C:\\www\\biblio\\App_Data\\bibliotheque.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";
SqlConnection Conn = new SqlConnection(CString);
Conn.Open();
string SqlString = "SELECT * FROM [OUVRAGE] WHERE LIBELLE_OUVRAGE='" + TextBox1.Text + "' & CODE_DOMAINE=" + DropDownList1.SelectedValue;
SqlDataAdapter oDataAdapter = new SqlDataAdapter(SqlString, Conn);
DataSet oDataSet = new DataSet("OUVRAGE");
oDataAdapter.Fill(oDataSet,"OUVRAGE");
GridView1.DataSource = oDataSet;
GridView1.DataBind(); |
qui donne une erreur sur la ligne
Code:
1 2
|
oDataAdapter.Fill(oDataSet,"OUVRAGE"); |
et voici l'erreur
Citation:
Syntaxe incorrecte vers '='.
j'ai une autre question, quel est l'equivalence du fonction LIMITde MySql dans sql server ?!
merci d'avance