[FIXED] ORA-00942: table or view does not exist

Posts   
 
    
carlor
User
Posts: 34
Joined: 12-Jan-2005
# Posted on: 25-Apr-2005 16:59:37   

Hi there,

I've just downloaded the new version because I need the new multiple schema support. Our database has all the tables in one schema and all the SPROCs in another. When I try to create a new project with the two schemas, I get the above error message. Is it possible that it is failing is because the SPROC schema does not contain any tables?

Below is the Core exception information returned:

-----[Core exception]-------------------- at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure) at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior) at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataTable dataTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at SD.LLBLGen.Pro.DBDrivers.Oracle.OracleSchemaRetriever.RetrieveAllStoredProcedures(OracleConnection openOracleConnection) at SD.LLBLGen.Pro.DBDrivers.Oracle.OracleSchemaRetriever.RetrieveSchema(String connectionString, IDBSchema schemaToRetrieve, SchemaFetchFlags fetchFlags) at SD.LLBLGen.Pro.DBDrivers.Oracle.OracleCatalogRetriever.RetrieveSchemas(String connectionString, IDBCatalog catalogToRetrieve, SchemaFetchFlags fetchFlags) at SD.LLBLGen.Pro.DBDrivers.Oracle.OracleDBDriver.PopulateSelectedCatalogs(Hashtable callBacks, Hashtable connectionElements, SchemaFetchFlags fetchFlags, Hashtable properties) at SD.LLBLGen.Pro.Gui.Forms.NewProjectWizard.CreateNewProject()

If I try to create a project based on the table schema, I must uncheck the stored proc and view options otherwise it errors out as well.

Thanks,

Carlo.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 25-Apr-2005 17:48:19   

The query I execute there is: SELECT OBJECT_NAME, PROCEDURE_NAME FROM ALL_PROCEDURES WHERE OWNER='_schema_'

where '_schema_' is for example 'SCOTT'

and therefore the user you use to connect has to have access to ALL_PROCEDURES, but that's generally the case.

Could you try in toad or isql+ to see if you can run that query with the same user?

Frans Bouma | Lead developer LLBLGen Pro
carlor
User
Posts: 34
Joined: 12-Jan-2005
# Posted on: 25-Apr-2005 18:13:42   

I was not able to execute the SQL statement. It gave me the ORA-00942 error message. Is this different than the previous version since I don't run into this problem with it. Our DBA is out of the office today so I'll see if she can do this when she gets back.

Thanks,

Carlo.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 25-Apr-2005 18:56:31   

carlor wrote:

I was not able to execute the SQL statement. It gave me the ORA-00942 error message. Is this different than the previous version since I don't run into this problem with it. Our DBA is out of the office today so I'll see if she can do this when she gets back.

It might be a permissions thing.

The previous version just read 1 schema. Say, you use the user 'SCOTT' to connect and you want to read SCOTT and HR.

SCOTT doesn't have rights on the HR stuff, so it might be that this is the problem. Previously, you just selected 'SCOTT' and that's it. Though now you're also able to select HR, which then might be the problem, as the single user you connect to is used to retrieve all selected schema's meta-data.

Frans Bouma | Lead developer LLBLGen Pro
carlor
User
Posts: 34
Joined: 12-Jan-2005
# Posted on: 26-Apr-2005 17:51:16   

Hi again,

According to our DBA and a few things I found through Google, it doesn't look like the ALL_PROCEDURES view exists in 8i (which is what we are using).

Your thoughts?

Thanks,

Carlo.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 26-Apr-2005 18:40:24   

Hmm, that can indeed be a problem. In the older drivers, the stored procs were retrieved using OleDb, which was terribly slow, hence the move to SQL only queries.

I've to think about a solution for this, IF there is a solution, as in: does 8i have an equivalent view or not.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 26-Apr-2005 19:32:36   

I can't find an equivalent which works. There is a select on ALL_OBJECTS but that only gives back the procedures not in a package.

I'll put back the code from the previous driver for 8i specifically, which uses OleDb for this situation. I'll then send you the driver for testing, as I don't have 8i present here.

Frans Bouma | Lead developer LLBLGen Pro
carlor
User
Posts: 34
Joined: 12-Jan-2005
# Posted on: 26-Apr-2005 20:55:45   

Ah, well. It would have been nice to have multiple schema support. I guess we'll just continue with the way we were doing things.

Thanks for your help,

Carlo.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 26-Apr-2005 21:30:08   

carlor wrote:

Ah, well. It would have been nice to have multiple schema support. I guess we'll just continue with the way we were doing things.

Thanks for your help, Carlo.

I've a driver ready for you in 30 minutes. simple_smile I don't give up this easily simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 26-Apr-2005 22:08:18   

Done!

I've mailed you a .zip (to the email address you specified at the forum (the hotmail account)) with the latest drivers. Please unpack that zip in the drivers\ folder overwriting the oracle driver among other drivers. If you've added the oracle driver to the GAC manually, be sure to remove that one first and update the GAC version with the version in the archive.

Please let me know if this driver fixes the problem and/or gives more problems.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 27-Apr-2005 18:14:40   

A fix for this is now available.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 27-Apr-2005 19:14:24   

It seems some other issue which is there for quite some time popped up. :( , the return values for some procedures aren't read. A re-release is scheduled for later today. Fixed.(return values from functions didn't show up as output parameters)

Frans Bouma | Lead developer LLBLGen Pro