Click here to Skip to main content
15,887,596 members
Home / Discussions / C#
   

C#

 
AnswerRe: Unhanded Exception Error Pin
Eddy Vluggen23-Jun-12 23:40
professionalEddy Vluggen23-Jun-12 23:40 
GeneralRe: Unhanded Exception Error Pin
Saidrex24-Jun-12 0:09
Saidrex24-Jun-12 0:09 
GeneralRe: Unhanded Exception Error Pin
Eddy Vluggen24-Jun-12 0:14
professionalEddy Vluggen24-Jun-12 0:14 
GeneralRe: Unhanded Exception Error Pin
Saidrex24-Jun-12 0:17
Saidrex24-Jun-12 0:17 
GeneralRe: Unhanded Exception Error Pin
Eddy Vluggen24-Jun-12 0:25
professionalEddy Vluggen24-Jun-12 0:25 
GeneralRe: Unhanded Exception Error Pin
Saidrex24-Jun-12 0:32
Saidrex24-Jun-12 0:32 
GeneralRe: Unhanded Exception Error Pin
jschell24-Jun-12 12:27
jschell24-Jun-12 12:27 
QuestionDelete specific rows from database tables Pin
Saidrex23-Jun-12 10:16
Saidrex23-Jun-12 10:16 
I have dataGridview table, when i click on specific cell in specific column, it searches text from that cell in other database tables and returns single rows. How to delete found rows from those tables?

I got this far:

C#
private void datoru_sarakstsDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
if (e.ColumnIndex == 7)
                {
string a = datoru_sarakstsDataGridView.Rows[e.RowIndex].Cells[1].Value.ToString();


DataRow[] sarakstsRow = datori_database.Tables["datoru_saraksts"].Select("datora_id = '" + a + "'");
                       
sarakstsRow[0].Delete();
DataRow[] konfigRow = datori_database.Tables["konfig"].Select("datora_id = '" + a + "'");
konfigRow[0].Delete();
DataRow[] osRow = datori_database.Tables["operetajsistemas"].Select("datora_id = '" + a + "'");
osRow[0].Delete();
DataRow[] progRow = datori_database.Tables["programmas"].Select("datora_id = '" + a + "'");
progRow[0].Delete();


But when i execute my program and try it, it doesn't delete those rows.

Sorry for my bad english.
AnswerRe: Delete specific rows from database tables Pin
Abhinav S23-Jun-12 18:22
Abhinav S23-Jun-12 18:22 
GeneralRe: Delete specific rows from database tables Pin
Saidrex23-Jun-12 22:37
Saidrex23-Jun-12 22:37 
AnswerRe: Delete specific rows from database tables Pin
Mycroft Holmes23-Jun-12 23:32
professionalMycroft Holmes23-Jun-12 23:32 
GeneralRe: Delete specific rows from database tables Pin
Saidrex23-Jun-12 23:34
Saidrex23-Jun-12 23:34 
GeneralRe: Delete specific rows from database tables Pin
Saidrex24-Jun-12 1:20
Saidrex24-Jun-12 1:20 
GeneralRe: Delete specific rows from database tables Pin
Saidrex24-Jun-12 3:09
Saidrex24-Jun-12 3:09 
QuestionHttp handlers Pin
jayanttripathi23-Jun-12 7:21
jayanttripathi23-Jun-12 7:21 
AnswerRe: Http handlers Pin
Vitaly Tomilov23-Jun-12 13:22
Vitaly Tomilov23-Jun-12 13:22 
AnswerRe: Http handlers Pin
BobJanova25-Jun-12 2:40
BobJanova25-Jun-12 2:40 
QuestionOverride C# event Pin
Thahir Pattanathel23-Jun-12 1:09
Thahir Pattanathel23-Jun-12 1:09 
AnswerRe: Override C# event Pin
OriginalGriff23-Jun-12 1:41
mveOriginalGriff23-Jun-12 1:41 
GeneralRe: Override C# event Pin
Thahir Pattanathel23-Jun-12 2:07
Thahir Pattanathel23-Jun-12 2:07 
AnswerRe: Override C# event Pin
Luc Pattyn23-Jun-12 3:50
sitebuilderLuc Pattyn23-Jun-12 3:50 
QuestionRe: Override C# event Pin
Thahir Pattanathel23-Jun-12 19:41
Thahir Pattanathel23-Jun-12 19:41 
GeneralRe: Override C# event Pin
Dave Kreskowiak23-Jun-12 3:51
mveDave Kreskowiak23-Jun-12 3:51 
QuestionStoring Info Between Events Pin
ASPnoob22-Jun-12 23:19
ASPnoob22-Jun-12 23:19 
AnswerRe: Storing Info Between Events Pin
Richard MacCutchan22-Jun-12 23:45
mveRichard MacCutchan22-Jun-12 23:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.