How do you get a vb.net program to send a session kill command to Oracle? I can do it in sqlplusw by just typing:
alter system kill session '45,30665';
In vb.net, I'm trying to do this with an oracle.dataAccess object:
oraConn As New OracleConnection("Data Source=db1;User ID=usr;Password=pw")
oraConn.Open()
Dim cmd As New OracleCommand
cmd.Connection = oraConn
cmd.CommandType = CommandType.Text
cmd.CommandText = "alter system kill session '45,30665';"
cmd.ExecuteNonQuery()
cmd.Dispose()
When it gets to the ExecuteNonQuery line, it throws an exception "ORA-00911: invalid character". I think it's expecting an SQL statement. I'm using VB Express 2008.