Click here to Skip to main content
16,011,626 members
Home / Discussions / Database
   

Database

 
GeneralRe: problem in select sql query Pin
Shuaib wasif khan10-May-09 8:30
Shuaib wasif khan10-May-09 8:30 
AnswerRe: problem in select sql query Pin
Jondo24shoots13-May-09 1:44
Jondo24shoots13-May-09 1:44 
QuestionHow to find row after query ? Pin
E_Gold10-May-09 6:50
E_Gold10-May-09 6:50 
AnswerRe: How to find row after query ? Pin
Blue_Boy10-May-09 9:00
Blue_Boy10-May-09 9:00 
AnswerRe: How to find row after query ? Pin
David Mujica10-May-09 15:17
David Mujica10-May-09 15:17 
QuestionDataset.merge() bad performance Pin
smr8510-May-09 0:25
smr8510-May-09 0:25 
QuestionDeleting Coresponding Row(s) Pin
JustinRiggs9-May-09 10:47
JustinRiggs9-May-09 10:47 
AnswerRe: Deleting Coresponding Row(s) Pin
JustinRiggs9-May-09 12:50
JustinRiggs9-May-09 12:50 
I got it to work like this, I added a new query called GetDatabyDcast to my casting datatable that says
DELETE FROM Casting WHERE MovieID =@MovieID
then I added that into the delete button. This probably isnt the best way to do it but it got the job done. If you know a better way, then let me know please. Thanks



Dim result As String
                  Dim i As Integer
                  i = MovieDataGridView.CurrentRow.Index
                  result = MsgBox("Are you sure you want to delete this movie?", MsgBoxStyle.OkCancel)
                  If result = vbOK Then

                           If MovieDataGridView.Rows.Count = 1 Then
                                    MsgBox("You must leave one movie in database!!")
                           Else
                                    Dim s As Integer
                                    s = Me.MovieDataGridView.CurrentRow.Index
                                    Dim a As String = Me.MovieDataGridView.Item(0, s).Value.ToString
                                    a = a
                                    Dim ta As New MovieProjectDataSetTableAdapters.CastingTableAdapter
                                    Dim tbl As MovieProjectDataSet.CastingDataTable
                                    tbl = ta.GetDataByDcast(a)

                                    Form3.CastingTableAdapter.Fill(Me.MovieProjectDataSet.Casting)

                                    Form3.Validate()
                                    Form3.CastingDataGridView.EndEdit()
                                    Form3.TableAdapterManager.UpdateAll(Me.MovieProjectDataSet)

                                    Me.MovieDataGridView.Rows.Remove(Me.MovieDataGridView.SelectedRows(0))

                           End If
GeneralRe: Deleting Coresponding Row(s) Pin
AlexeiXX39-May-09 17:34
AlexeiXX39-May-09 17:34 
AnswerRe: Deleting Coresponding Row(s) Pin
AlexeiXX39-May-09 17:30
AlexeiXX39-May-09 17:30 
Questionsql toolkit Pin
Tauseef A9-May-09 10:38
Tauseef A9-May-09 10:38 
AnswerRe: sql toolkit Pin
Colin Angus Mackay10-May-09 3:26
Colin Angus Mackay10-May-09 3:26 
QuestionSearching a multidemensional array... Pin
new_phoenix9-May-09 9:30
new_phoenix9-May-09 9:30 
AnswerRe: Searching a multidemensional array... Pin
riced10-May-09 2:11
riced10-May-09 2:11 
QuestionCursors in SQL Server 2000 SPs Pin
Syed Shahid Hussain9-May-09 4:49
Syed Shahid Hussain9-May-09 4:49 
QuestionHow to find original row count in MySQL? Pin
Willington8-May-09 23:48
Willington8-May-09 23:48 
AnswerRe: How to find original row count in MySQL? Pin
scottgp9-May-09 9:00
professionalscottgp9-May-09 9:00 
QuestionROUND([float]) function problem Pin
adamoz8-May-09 3:25
adamoz8-May-09 3:25 
AnswerRe: ROUND([float]) function problem Pin
Blue_Boy8-May-09 21:56
Blue_Boy8-May-09 21:56 
AnswerRe: ROUND([float]) function problem Pin
Ennis Ray Lynch, Jr.11-May-09 3:44
Ennis Ray Lynch, Jr.11-May-09 3:44 
AnswerRe: ROUND([float]) function problem Pin
adamoz11-May-09 4:05
adamoz11-May-09 4:05 
QuestionHow to know about connection status for mysql/sql server Pin
MKC0027-May-09 22:54
MKC0027-May-09 22:54 
QuestionHow to restore a MySQL database using vb 6.0 Pin
Willington7-May-09 20:27
Willington7-May-09 20:27 
AnswerRe: How to restore a MySQL database using vb 6.0 Pin
Mycroft Holmes8-May-09 1:43
professionalMycroft Holmes8-May-09 1:43 
AnswerRe: How to restore a MySQL database using vb 6.0 Pin
Ennis Ray Lynch, Jr.11-May-09 5:42
Ennis Ray Lynch, Jr.11-May-09 5:42 

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.