Hi
I need help again!:sign0085:
In a road design I have a database which holds the horizontal alignment, vertical alignment, widths, crossfalls, batters, etc. With the batters I have the following parameters: which side of the road (either left or right), the condition (cut or fill), the batter slope for the condition, the stake (the distance along the alignment, etc.
My erase routine is as follows:
Sub EraseBat_Click
If Combobox3.Text<>"" AND Combobox4.Text<>"" AND Combobox6.Text<>"" Then
i=Msgbox ("Are You Sure To Erase The Batter At SV " & Combobox6.Text & "? ","Erase Batter",cMsgboxYesNo,cMsgboxQuestion)
If i=cYes Then
cmd.AddParameter("Value1")
cmd.CommandText = "Delete From Batter Where Stake = @value1" cmd.SetParameter("Value1",Combobox1.Text)
cmd.ExecuteNonQuery
ComboBox2.Text="" :ComboBox3.Text="" :ComboBox4.Text="" :ComboBox5.Text="" :ComboBox6.Text=""
Textbox13.Text="" :Textbox15.Text="" :Textbox16.Text="" :Textbox17.Text=""
ComboBox3.Focus
End If
Else
Msgbox ("Select A Valid Batter To Erase", "Erase Batter", cMsgboxOK, cMsgboxExclamation)
Combobox6.Focus
End If
End Sub
What I would like to do is to erase the design batter which has more than one condition which is true....i.e. delete where the stake value, side and condition meets a criteria.
Thanks
Michael
I need help again!:sign0085:
In a road design I have a database which holds the horizontal alignment, vertical alignment, widths, crossfalls, batters, etc. With the batters I have the following parameters: which side of the road (either left or right), the condition (cut or fill), the batter slope for the condition, the stake (the distance along the alignment, etc.
My erase routine is as follows:
Sub EraseBat_Click
If Combobox3.Text<>"" AND Combobox4.Text<>"" AND Combobox6.Text<>"" Then
i=Msgbox ("Are You Sure To Erase The Batter At SV " & Combobox6.Text & "? ","Erase Batter",cMsgboxYesNo,cMsgboxQuestion)
If i=cYes Then
cmd.AddParameter("Value1")
cmd.CommandText = "Delete From Batter Where Stake = @value1" cmd.SetParameter("Value1",Combobox1.Text)
cmd.ExecuteNonQuery
ComboBox2.Text="" :ComboBox3.Text="" :ComboBox4.Text="" :ComboBox5.Text="" :ComboBox6.Text=""
Textbox13.Text="" :Textbox15.Text="" :Textbox16.Text="" :Textbox17.Text=""
ComboBox3.Focus
End If
Else
Msgbox ("Select A Valid Batter To Erase", "Erase Batter", cMsgboxOK, cMsgboxExclamation)
Combobox6.Focus
End If
End Sub
What I would like to do is to erase the design batter which has more than one condition which is true....i.e. delete where the stake value, side and condition meets a criteria.
Thanks
Michael