我正在尝试从Oracle Sql Developer服务器获取数据。连接正常但我似乎在尝试从数据库获取实际数据时遇到问题。我一直收到以下错误: {" ORA-00942:表或视图不存在"}
我使用的代码如下:
Public connectionString As String
Public sqlCom As String
Public command As New OracleCommand
Public con As New OracleConnection
Public dr As OracleDataReader
connectionString = "Data Source=orcl; User Id=system; Password=parola1234;"
con = New OracleConnection(connectionString)
Try
con.Open()
''MessageBox.Show("succes")
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
command.Connection = con
sqlCom = "select TICKETID from system.TICKETS where TICKETID = " + txtTicket.Text
command.CommandText = sqlCom
dr = command.ExecuteReader()
If (dr.HasRows) Then
While (dr.Read())
Me.Hide()
GlobalVariables.ticketNOText = txtTicket.Text
Tracking.Show()
End While
Else
MessageBox.Show("Invalid Ticket Number!")
End If
这是我的SQL DB的图片: 1