Friday, February 24, 2012

How I can make trigger to Add Row 4 to my data base?

Hi

I need help about this problem

I have a data grid view like this:

Index

Code(releted to other table)

Name

Price +

Price _

1

1

BMW X5

1000000 $

2

1

BMW X3

500000 $

3

1

BMW Z3

250000 $

4

1

SUM

1750000 $

Row 4 must add by code automatically.
How? I must Use trigger or . . .?

my user may want to edit the data (some row OR price) I have a Problem.

How I can make a Code for Make SUM add row 4 and Delete this row when it loaded to edit? (Select and delete)

Or I can do some thing better than delete the row and write it again?

This doesn't seem like a SQL Server problem. If you do not want to persist the results in the backend you should do it in the client-side and add the extra row to the DataGrid from code. You should post this question in the Visual Studio or .NET Framework newsgroups.

No comments:

Post a Comment