Hallo Liste,
Mein sch�nes DataGrid UpdateCommand geht nicht mehr :-(
Ich habe die <BoundColum/>'s zu <Template Columns> umgebaut, und nun bekomme
ich folgende Fehlermeldung:
System.InvalidCastException: Specified cast is not valid.
Das updateCommand sieht folgenderma�en aus:
cmd.Parameters.Add("@Bildname", CType(e.Item.Cells(0).Controls(0),
TextBox).Text)
cmd.Parameters.Add("@Bildtitel",
CType(e.Item.Cells.Item(1).Controls.Item(0), TextBox).Text)
cmd.Parameters.Add("@Beschreibung",
CType(e.Item.Cells.Item(2).Controls.Item(0), TextBox).Text)
cmd.CommandText = "Update tblTourenbuchbild Set Bild = @Bildname,
[EMAIL PROTECTED], [EMAIL PROTECTED] WHERE tblID = " &
CInt(DataGrid1.DataKeys(e.Item.ItemIndex))
cmd.ExecuteNonQuery()
Wer wei� was? :-)
Reinhold
_______________________________________________
Asp.net Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net