CodeSmith Community
Your Code. Your Way. Faster!

Oracle Schema provider


posted by flash_us
07-23-2007

Downloads: 612
File size: 12.8kB
Views: 2,770
Oracle Schema provider
Filed under: ,

 The original version was made by Michael Toscano and Geoff McElhanon.

Now it is able to retrieve keys and fields information from Oracle. That meant much better working with NetTiers!  The only file that isn't generated is the file with stored procedures. Hope guys from NetTiers will fix it soon.

Made by Ilya Dyachenko aka flash_us. 

Comments

Robert Hinojosa wrote re: Oracle Schema provider
on 07-31-2007 5:03 PM
It's asking for a config file whenever i try to use it. What is that config file supposed to look like?
flash_us wrote re: Oracle Schema provider
on 07-31-2007 6:05 PM
Sorry, I forgot to attach it. Contents of "SchemaExplorer.OracleNativeSchemaProvider.dll.config": <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <!-- Indicates the schema in which the CODESMITH_EXTENDED_PROPERTIES table should reside. Leave this entry commented out to always use current user's schema. --> <!-- <add key="ExtendedPropertiesTableOwner" value="SYSTEM" /> --> <!-- Indicates whether or not the provider should automatically create the extended properties table. Setting this to true creates the table in the schema specified by the 'ExtendedPropertiesTableOwner' value above, or the current user's schema if value isn't present. --> <add key="AutoCreateExtendedPropertiesTable" value="false" /> <!-- Specifies whether to show user-owned objects only. --> <add key="ShowMySchemaOnly" value="true" /> <!-- Specifies whether to allow schema provider to execute procedures that return REF CURSORs to determine the column schema information. Allowing this can result in a change in the state of the database due to things like explicit transaction handling in PL/SQL or usage of a sequence's 'nextval' property. --> <add key="AllowGetCommandResultSchemas" value="false" /> </appSettings> </configuration>
chingo_mucho wrote re: Oracle Schema provider
on 08-04-2007 6:11 PM
Very useful, could publish the source code?
flash_us wrote re: Oracle Schema provider
on 08-05-2007 6:39 PM
Could anybody advice how to post a new file instead of an old one ? (Number-> Decimal issue were fixed about a week ago, just forgot to upload it.)
rainmanalex wrote re: Oracle Schema provider
on 08-06-2007 10:50 AM
Hi guys Can anyone help me. I tried to get the data layer created using CodeSmith on Oracle database. The error message reports " Extended properties are not yet supported for this type. " Is there a way to disable the extended properties. I couldn't find a config file with this version of codesmith to update. Is it a property now? Hope someone can help. Cheers Rain Man System.NotSupportedException: Unexpected SchemaExplorer type 'MemberColumnSchema' encountered. Extended properties are not yet supported for this type. at SchemaExplorer.OracleSchemaProvider.GetExtendedProperties(String connectionString, SchemaObjectBase schemaObject) at SchemaExplorer.SchemaObjectBase.get_ExtendedProperties() at MoM.Templates.CommonSqlCode.IsIdentityColumn(ColumnSchema column) in c:\Documents and Settings\adaikam\My Documents\CodeSmith\Samples\v4.1\Templates\NetTiers\TemplateLib\CommonSqlCode.cs:line 2194 at _CodeSmith.NetTiers_cst.EntityData.__RenderMethod1(TextWriter writer, Control control) in c:\Documents and Settings\adaikam\My Documents\CodeSmith\Samples\v4.1\Templates\NetTiers\Entities\EntityData.cst:line 49 at CodeSmith.Engine.DelegateControl.Render(TextWriter writer) at CodeSmith.Engine.Control.RenderChildren(TextWriter writer) at CodeSmith.Engine.Control.Render(TextWriter writer) at CodeSmith.Engine.CodeTemplate.Render(TextWriter writer) at CodeSmith.Engine.CodeTemplate.RenderToString() at _CodeSmith.NetTiers_cst.EntityInstanceBaseGenerated.__RenderMethod1(TextWriter writer, Control control) in c:\Documents and Settings\adaikam\My Documents\CodeSmith\Samples\v4.1\Templates\NetTiers\Entities\EntityInstanceBase.generated.cst:line 981 at CodeSmith.Engine.DelegateControl.Render(TextWriter writer) at CodeSmith.Engine.Control.RenderChildren(TextWriter writer) at CodeSmith.Engine.Control.Render(TextWriter writer) at CodeSmith.Engine.CodeTemplate.Render(TextWriter writer) at CodeSmith.Engine.CodeTemplate.RenderToFile(String path, Boolean overwrite) at _CodeSmith.NetTiers_cst.RenderToFile(String templateName, String path, Boolean overwrite) in c:\Documents and Settings\adaikam\My Documents\CodeSmith\Samples\v4.1\Templates\NetTiers\NetTiers.cst:line 591 at _CodeSmith.NetTiers_cst.Go() in c:\Documents and Settings\adaikam\My Documents\CodeSmith\Samples\v4.1\Templates\NetTiers\NetTiers.cst:line 3258 at _CodeSmith.NetTiers_cst.__RenderMethod1(TextWriter writer, Control control) in c:\Documents and Settings\adaikam\My Documents\CodeSmith\Samples\v4.1\Templates\NetTiers\NetTiers.cst:line 4257 at CodeSmith.Engine.DelegateControl.Render(TextWriter writer) at CodeSmith.Engine.Control.RenderChildren(TextWriter writer) at CodeSmith.Engine.Control.Render(TextWriter writer) at CodeSmith.Engine.CodeTemplate.Render(TextWriter writer) at CodeSmith.Engine.CodeTemplate.RenderToString() at CodeSmith.Gui.CodeTemplateGenerator.f(Object A_0, EventArgs A_1)
flash_us wrote re: Oracle Schema provider
on 08-06-2007 6:14 PM
Rainman, Please tell your Oracle version and the exact type that doesn't supported.
obsolete wrote re: Oracle Schema provider
on 08-08-2007 2:31 AM
Hi, I've had the same problem as rainmanalex, please take a look at this, if someone thinks that could help: http://community.codesmithtools.com/forums/p/7089/26970.aspx#26970 Thanks a lot.
obsolete wrote re: Oracle Schema provider
on 08-08-2007 2:54 AM
sorry, I've made a mistake, this latest dll solves the problem, thanx anyway.
madhukar_g wrote re: Oracle Schema provider
on 08-08-2007 3:35 PM
thanks for fix.
madhukar_g wrote re: Oracle Schema provider
on 08-09-2007 9:48 AM
\n\t\t\t\t\n\t\t\t\tSELECT\n\t\t\t\t\t[SALES_KEY],\n\t\t\t\t\t[SALES_REFERENCE],\n\t\t\t\t\t[COMPANY_NAME],\n\t\t\t\t\t[ORDER_DATE],\n\t\t\t\t\t[CUSTOMER_PO],\n\t\t\t\t\t[ORDER_TYPE],\n\t\t\t\t\t[STATUS]\n\t\t\t\tFROM\n\t\t\t\t\tMDATTEST.[VIEW_SALES_ORDERS_LIST]\n\t\t\t\t\t\n\t\t\t\tSelect @@ROWCOUNT\t\t\t\n\t\t\t I am working with nettier2.2...was able to generate code with Oracle 10g using codesmith 4.0. but mu comamnd test was coming like this..what to do ? am I miss any thing here ?
flash_us wrote re: Oracle Schema provider
on 08-10-2007 1:41 AM
madhukar_g, Please, note, that .NetTiers don't have oracle support. It generates SQL Server code as I understood. .NetTiers needs a lot of modifications to make it oracle compatible. For details please refer to http://community.codesmithtools.com/forums/p/7089/27035.aspx#27035
axel32 wrote re: Oracle Schema provider
on 11-06-2007 4:26 AM
Hi thx a lot for the provider. I am almost able to generate .netTier form Oracle DB. I work on Oracle 10g, codesmith 4.0, the access provider is Oracle.DataAccess.Client (provided by oracle). the columns typed with Number (4,0) are casted by the schemaProvider as int32, which throw an exception since Oracle.DataAccess.Client return an int16. Same pb for decimal type, they are casted as Int32. Anyway to fix that thx a lot
Vinny Davi wrote re: Oracle Schema provider
on 01-28-2008 10:42 AM
I'm running Codesmith 4.1. Is this version of the dll already there? If not, what are the instructions, aside from copying the dll to the C:\Program Files\CodeSmith\v4.1\SchemaProviders directory. When I tried this, I got the following error: TargetInvocationException (SchemaExplorer.DatabaseSchema.GetProviders) v4.1.2.2729 Please help!! Thanks!
Vinny Davi wrote re: Oracle Schema provider
on 01-28-2008 10:56 AM
Please disregard my previous comment. I win my own 'Tool of the day' award for mispelling the name of the config file.
rainmanalex wrote re: Oracle Schema provider
on 01-31-2008 3:52 AM
Hi there, Sorry for this very delayed reply. I wasn't aware that this thread was growing as i didn't get any info on my inbox. Ok, the Oracle versions are as below Client :- Oracle 10g Server:- Oracle 8i I know the server has to be upgraded but at the moment the company is happy to stick to Oracle 8i for some more time. As i said before the error i get is when i try .net tiers is Unexpected SchemaExplorer type 'MemberColumnSchema' encountered If i get a way around this issue then it shall be great. Don't mind if i don't get the Extended properties Thanks in anticipation.
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems