using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class Korpa : System.Web.UI.Page
{
protected void Button1_Click(object sender, EventArgs e)
{
System.Data.SqlClient.SqlConnection konekcija = new System.Data.SqlClient.SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\Proba.mdf;Integrated Security=True;User Instance=True");
konekcija.Open();
if (Request.QueryString[0].Equals("isprazni"))
{
SqlCommand komanda = new SqlCommand("DELETE FROM Stavke_racun WHERE Racun_idRacuna in (select max(Racun_idRacuna) from Stavke_racun)", konekcija);
komanda.ExecuteNonQuery();
SqlDataSource1.Delete();
}
}
}
Problem je u tome sto se gore definisani query uopste ne izvrsava,. Postoji li negde greska u kodu? Pozdrav
[Ovu poruku je menjao Shadowed dana 25.06.2008. u 18:14 GMT+1]