LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV Database Toolikit Error -2147217865

Solved!
Go to solution

Hello.

 

Curetly I'm trying to familiarize myself with LV Database Toolkit version 2014.

In our company we are using database on remote server, so our IT guy installed on my computer Oracle and sets DSN. Now, in LV, I'm able to create connection and list all tables in that database, but when I try to list column information I'm getting this error:

"Error -2147217865 occurred at NI_Database_API.lvlib:Conn Execute.vi->NI_Database_API.lvlib:DB Tools List Columns.vi->Untitled 1"

In possible reasons it says that table doesn't exist on database, but that is non-sens. is there something that I'm missing? Something in DSN setting or....?

 

Bellow is screenshot of my code and that error message.

Thanks


LV_database_error.png

0 Kudos
Message 1 of 4
(3,897 Views)
Solution
Accepted by topic author SefaraP

Error:ORA-00942: table or view does not exist

You tried to execute a SQL statement that references a table or view that either does not exist, that you do not have access to, or that belongs to another schema and you didn't reference the table by the schema name.

The option(s) to resolve this Oracle error are:

Option #1

If this error occurred because the table or view does not exist, you will need to create the table or view.You can check to see if the table exists in Oracle by executing the following SQL statement:

 

SELECT *
FROM all_objects
WHERE object_type IN ('TABLE','VIEW')
AND object_name = 'OBJECT_NAME';


For example, if you are looking for a suppliers table, you would execute:

SELECT *
FROM all_objects
WHERE object_type IN ('TABLE','VIEW')
AND object_name = 'SUPPLIERS';


Option #2

If this error occurred because you do not have access to the table or view, you will need to have the owner of the table/view, or a DBA grant you the appropriate privileges to this object.

Option #3

If this error occurred because the table/view belongs to another schema and you didn't reference the table by the schema name, you will need to rewrite your SQL to include the schema name.

For example, you may have executed the following SQL statement:

SELECT *
FROM suppliers;
But the suppliers table is not owned by you, but rather, it is owned by a schema called app, you could fix your SQL as follows:

SELECT *
FROM app.suppliers;
If you do not know what schema the suppliers table/view belongs to, you can execute the following SQL to find out:

SELECT owner
FROM all_objects
WHERE object_type IN ('TABLE','VIEW')
AND object_name = 'SUPPLIERS';
This will return the schema name who owns the suppliers table.

Source: https://www.techonthenet.com/oracle/errors/ora00942.php

Thanks
uday
Message 2 of 4
(3,866 Views)

Hello @udka

Thank you for your answer, you were right about this. The problem was in calling table without proper schema name. Now everything seems to work correct.

Best regards

0 Kudos
Message 3 of 4
(3,841 Views)

SELECT *
FROM suppliers;
But the suppliers table is not owned by you, but rather, it is owned by a schema called app, you could fix your SQL as follows:

SELECT *
FROM app.suppliers;
If you do not know what schema the suppliers table/view belongs to, you can execute the following SQL to find out:

SELECT owner
FROM all_objects
WHERE object_type IN ('TABLE','VIEW')
AND object_name = 'SUPPLIERS';
This will return the schema name who owns the suppliers table.

 
 

0 Kudos
Message 4 of 4
(2,949 Views)