Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access Deleted Row's PK
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
01375254
Message ID:
01375256
Vues:
4
oCommand.CommandText = "delete from students where recordid = " + Row["RecordId", DataRowVersion.Original].ToString();
HTH

>I'm trying this:
>
>
>// Delete the test row
>oDS.Tables[0].Rows[oDS.Tables[0].Rows.Count - 1 ].Delete();
>
>foreach (DataRow Row in oDS.Tables[0].Rows)
>{
>    oCommand.Parameters.Clear();
>
>    switch (Row.RowState)
>    {
>        case DataRowState.Added:
>            break;
>
>        // Do the same for DataRowState Deleted and Modified
>        case DataRowState.Deleted:
>            oCommand.CommandText = "delete from students where recordid = " + Row["RecordId"].ToString();
>            break;
>
>        case DataRowState.Modified:
>            break;
>    }
>
>    oCommand.ExecuteNonQuery();
>}
>
>
>On the row with the delete command I get "Deleted row information cannot be accessed through the row"
>
>So how DO you get it???
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform