利用vb.net删除oracle中的数据具体代码如下
Sub deledate()
' Dim deldate As String = "delete from agvnew1 where agvid='AGV4DMA01'"
Dim id As String = binlist
Dim orastr As String = "delete from agvnew1 where binlist=" + id
constring = ConfigurationManager.AppSettings("ConnectionString").ToString()
'Dim myconnection As OracleConnection = New OracleConnection(constring)
myconnection = New OracleConnection(constring)
'cmds = myconnection.CreateCommand
myconnection.Open()
cmds = New OracleCommand(orastr, myconnection)
Dim iValue As Integer = cmds.ExecuteNonQuery()
If (iValue > 0) Then
cmds.CommandText = "select *form AGVNEW1"
' Dim dr As OracleDataReader = cmds.ExecuteReader
End If
End Sub
首先要打开数据库,在定义符合规格的ID,删除对应的数据