CodeSmith Community
Your Code. Your Way. Faster!

Oracle netTiers support seems to be possible now.

Latest post 07-18-2008 8:03 PM by Vinny Davi. 54 replies.
  • 08-16-2007 4:20 AM In reply to

    Re: Oracle netTiers support seems to be possible now.

    Good morning, flash. I have sgtarted the conversion of the version 2.2. As I had almost the job odne with the version 2, the work is going quick. For example, the GetPaged works fine. I am documenting the changes done using MS One Note, but I can use a plain text file. I can use a repository, or do what you say, I have no problem about that (now I think, my English is poor, excuse me...) Tell me what to do or say and I start posting files...

    • Post Points: 35
  • 08-16-2007 5:48 AM In reply to

    • swin
    • Top 10 Contributor
    • Joined on 06-14-2006
    • London, UK
    • Posts 922
    • Points 34,710

    Re: Oracle netTiers support seems to be possible now.

    Will we be able to incorporate the changes you are making for Oracle into the main branch?

    swin 

    ------------------------------------------------- Member of the .NetTiers team -------------------------------------------------
    • Post Points: 35
  • 08-16-2007 5:38 PM In reply to

    • flash_us
    • Top 500 Contributor
    • Joined on 03-16-2007
    • Posts 16
    • Points 18,650

    Re: Oracle netTiers support seems to be possible now.

     swin,

    I think that is good idea. How we can get an access to the repository ? Do you have any set of rules to work with it ? 

    • Post Points: 35
  • 08-17-2007 2:20 AM In reply to

    • swin
    • Top 10 Contributor
    • Joined on 06-14-2006
    • London, UK
    • Posts 922
    • Points 34,710

    Re: Oracle netTiers support seems to be possible now.

    Get Tortoise SVN client and make sure you're using the latest SVN of .netTiers.  Then using Tortoise create a patch and post that.

    Update access is currently limited to the .netTiers team members.

    hth

    swin 

    ------------------------------------------------- Member of the .NetTiers team -------------------------------------------------
    • Post Points: 85
  • 08-18-2007 5:33 PM In reply to

    Re: Oracle netTiers support seems to be possible now.

    Here I send you a patch for four files:
     
    - Nettiers.cst: Oracle provider detection.
    - CommonSqlCode: Changes in comments (Oracle sends crlf in comments -tables and columns- so you get the error "new line in constant".
    - Property PrefijoParametros. It's uses to define the prefix in parameter names (@ for SQL Server - the default - and : for Oracle).
    - CreateTemplate and Framework templates. A file for Oracle sql is included under GenericClient. I send to you too. If you think it could be added to the repository, let me know and I send you the rest of files, so we don't waste time...
     
    Bye.
     
    PS: You'll have to change the vsnet2005.cst file, because it creates the project looking for SQLLite.Procedures instead of System.Data.Oracle.Procedures.cst
    • Post Points: 5
  • 08-18-2007 5:35 PM In reply to

    Re: Oracle netTiers support seems to be possible now.

    Here I send you a patch for four files:
     
    - Nettiers.cst: Oracle provider detection.
    - CommonSqlCode: Changes in comments (Oracle sends crlf in comments -tables and columns- so you get the error "new line in constant".
    - Property PrefijoParametros. It's uses to define the prefix in parameter names (@ for SQL Server - the default - and : for Oracle).
    - CreateTemplate and Framework templates. A file for Oracle sql is included under GenericClient. I send to you too. If you think it could be added to the repository, let me know and I send you the rest of files, so we don't waste time...
     
    Bye.
     
     


     
    17 Aug 2007 02:23:44 -0500, swin <bounce-swin@codesmithsupport.com>:

    Get Tortoise SVN client and make sure you're using the latest SVN of .netTiers.  Then using Tortoise create a patch and post that.

    Update access is currently limited to the .netTiers team members.

    hth

    swin 





    • Post Points: 5
  • 08-18-2007 5:55 PM In reply to

    Re: Oracle netTiers support seems to be possible now.

    And here I send youu two more patches. The first one is for the web config files. The second one is for the GenericEntityProviderBase.generated.cst. I think you should be able to compile the solution generated against the HR eschema in Oracle. Don't forget the missing file (SQLLite procedures...). You can take all the tables. If you select the view, you'll get compile errors, because some files are generated under the SQLServer folder.
     
    Bye, I go to sleep...
    • Post Points: 5
  • 08-18-2007 6:05 PM In reply to

    Re: Oracle netTiers support seems to be possible now.

    And this is the last one...
     
     
    • Post Points: 5
  • 08-18-2007 6:05 PM In reply to

    Re: Oracle netTiers support seems to be possible now.

    I forgot two files, excuse me. I re-post all,
     
     
    • Post Points: 5
  • 09-06-2007 7:54 AM In reply to

    Re: Oracle netTiers support seems to be possible now.

    Hi swim.

     

    swin:

    Get Tortoise SVN client and make sure you're using the latest SVN of .netTiers.  Then using Tortoise create a patch and post that.

    Update access is currently limited to the .netTiers team members.

    hth

    swin 

    How (or where) can I post the patches? I could have a working version very soon, by now it's beta but almost working.

    Thanks. 

     

    • Post Points: 35
  • 09-06-2007 8:42 AM In reply to

    • swin
    • Top 10 Contributor
    • Joined on 06-14-2006
    • London, UK
    • Posts 922
    • Points 34,710

    Re: Oracle netTiers support seems to be possible now.

     post here

    swin 

    ------------------------------------------------- Member of the .NetTiers team -------------------------------------------------
    • Post Points: 35
  • 09-08-2007 3:39 PM In reply to

    Re: Oracle netTiers support seems to be possible now.

     Ok, here I paste the patch. I don't know how to post a file, sorry. If you apply this patch and generate a Nettiers app against the hr schema in Oracle 10G Express you get a "almost" working app. The file is so long because includes a file for oracle commands. Please, think about including in the repository.

     

    Bye. 

     

    Index: ASP.NET/Common/WebConfig.cst
    ===================================================================
    --- ASP.NET/Common/WebConfig.cst    (revision 624)
    +++ ASP.NET/Common/WebConfig.cst    (working copy)
    @@ -29,7 +29,7 @@
         </connectionStrings>
         <<%= DALNameSpace %> defaultProvider="<% if (NetTiersSqlProvider) {%>SqlNetTiersProvider<% } else {%>GenericNetTiersProvider<%}%>">
             <providers>
    -        <% if (NetTiersSqlProvider) { %>
    +        <%if (NetTiersSqlProvider) { %>
                 <!--
                     *** SqlClient Provider ***
                         connectionStringName: sqlclient connection string to the db
    @@ -46,7 +46,7 @@
                   enableMethodAuthorization="false"
                   useStoredProcedure="false"
                   defaultCommandTimeout="30"
    -            />
    +        />
                 <% } else { %>
             <!--
         *** GenericClient Provider ***
    @@ -65,8 +65,8 @@
             entityFactoryType="<%= FactoryType %>"
             enableEntityTracking="true"
             enableMethodAuthorization="false"
    -        />
    -    <% } %> 
    +        />   
    +            <% } %> 
                 <!--
                     *** WebserviceClient Provider ***
                     The url parameter indicates the webservices url (ex: http://localhost/<%= NameSpace %>/<%= NameSpace %>Services.aspx)
    Index: ASP.NET/Common/WebConfigAtlas.cst
    ===================================================================
    --- ASP.NET/Common/WebConfigAtlas.cst    (revision 624)
    +++ ASP.NET/Common/WebConfigAtlas.cst    (working copy)
    @@ -10,6 +10,9 @@
     <%@ Property Name="IncludeAtlasToolkit" Type="System.Boolean" Default="false" Category="06b. Website - Advanced" Description="Indicates whether to include the Atlas Control Toolkit." %>
     <%@ Property Name="EntLibVersion" Type="MoM.Templates.EntLibVersion" Default="v2" Category="02. Framework Generation - Optional" Description="Indicates the Enterprise Library version to use. Options include v2, v3 and v3.1" %>
     
    +<%@ Property Name="NetTiersSqlProvider" Type="System.Boolean" Category="Data" Description="Indicates if we use the SqlClient Provider." %>
    +<%@ Property Name="ProviderInvariantName" Type="System.String" Category="Data" Description="The DBProviderFactory name." %>
    +
     <%@ Assembly Name="SchemaExplorer" %>
     <%@ Assembly Name="System.Design" %>
     <%@ Import Namespace="SchemaExplorer" %>
    @@ -33,8 +36,9 @@
       <connectionStrings>
         <add name="<%= DALNameSpace %>.ConnectionString" connectionString="<%= ConnectionString %>" />
       </connectionStrings>
    -    <<%= DALNameSpace %> defaultProvider="SqlNetTiersProvider">
    +    <<%= DALNameSpace %> defaultProvider="<% if (NetTiersSqlProvider) {%>SqlNetTiersProvider<% } else {%>GenericNetTiersProvider<%}%>">
             <providers>
    +        <%if (NetTiersSqlProvider) /* jmf */{ %>             
                 <!--
                     *** SqlClient Provider ***
                         connectionStringName: sqlclient connection string to the db
    @@ -47,10 +51,25 @@
                   providerInvariantName="System.Data.SqlClient"
                   entityFactoryType="<%= FactoryType %>"
                   useEntityFactory="true"
    -              enableEntityTracking="false"
    +              enableEntityTracking="true"
                   enableMethodAuthorization="false"
                   useStoredProcedure="false"
    -              defaultCommandTimeout="30"/>
    +              defaultCommandTimeout="30"
    +        />
    +            <% } else { %>
    +           
    +    <add
    +        name="GenericNetTiersProvider"
    +        type="<%=DALNameSpace%>.GenericClient.GenericNetTiersProvider, <%=DALNameSpace%>.GenericClient"
    +        connectionStringName="<%= DALNameSpace %>.ConnectionString"
    +        useStoredProcedure="false"
    +        providerInvariantName="<%=ProviderInvariantName%>"
    +        entityFactoryType="<%= FactoryType %>"
    +        enableEntityTracking="true"
    +        enableMethodAuthorization="false"
    +        />
    +            <% } %>
    +           
                 <!--
                     *** WebserviceClient Provider ***
                     The url parameter indicates the webservices url (ex: http://localhost/<%= NameSpace %>/<%= NameSpace %>Services.aspx)
    @@ -59,6 +78,7 @@
                         type="<%= DALNameSpace %>.WebServiceClient.WsNetTiersProvider, <%= DALNameSpace %>.WebServiceClient"
                         url="/<%= NameSpace %>Services.asmx" />
                 -->
    +             
             </providers>
         </<%= DALNameSpace %>>
       <!--
    Index: Components/ComponentBase.cst
    ===================================================================
    --- Components/ComponentBase.cst    (revision 624)
    +++ Components/ComponentBase.cst    (working copy)
    @@ -108,6 +108,7 @@
         }
         %>
         Important: Do not modify this file. Edit the file <%=className%>.cs instead.
    +    Components\ComponentBase.cst
     */
     
     #region Using Directives
    Index: Components/ComponentServiceBase.cst
    ===================================================================
    --- Components/ComponentServiceBase.cst    (revision 624)
    +++ Components/ComponentServiceBase.cst    (working copy)
    @@ -106,6 +106,7 @@
         }
         %>
         Important: Do not modify this file. Edit the file <%=className%>.cs instead.
    +    Components\ComponentServiceBase.cst
     */
     
     #region Using Directives
    Index: DataAccessLayer.GenericClient/DbCommandManager.cst
    ===================================================================
    --- DataAccessLayer.GenericClient/DbCommandManager.cst    (revision 624)
    +++ DataAccessLayer.GenericClient/DbCommandManager.cst    (working copy)
    @@ -53,7 +53,9 @@
                         {
                             _instances = new Dictionary<string, DbCommandProvider>();
                             //_instances.Add("System.Data.Sql", DbCommandProvider.Create("System.Data.Sql"));
    -                        _instances.Add("System.Data.SQLite", DbCommandProvider.Create("System.Data.SQLite"));
    +                        //_instances.Add("System.Data.SQLite", DbCommandProvider.Create("System.Data.SQLite"));
    +                        //@jmf --> Se a?ade la linea para oracle  odp
    +                        _instances.Add("System.Data.OracleClient", DbCommandProvider.Create("System.Data.OracleClient"));                       
                         }
                     }
                 }
    Index: DataAccessLayer.GenericClient/GenericEntityProviderBase.generated.cst
    ===================================================================
    --- DataAccessLayer.GenericClient/GenericEntityProviderBase.generated.cst    (revision 624)
    +++ DataAccessLayer.GenericClient/GenericEntityProviderBase.generated.cst    (working copy)
    @@ -102,6 +102,7 @@
         }
         %>
         Important: Do not modify this file. Edit the file <%=providerName%>.cs instead.
    +    GenericClient\GenericEntityProviderBase.generated.cst
     */
     
     #region using directives
    @@ -238,7 +239,7 @@
                 DbCommand commandWrapper = DbCommandProvider.GetCommandWrapper(database, "<%=owner + ProcedurePrefix + commandStem + SelectSuffix + "By" + functionname%>", _useStoredProcedure, _providerInvariantName);
                
                 <% foreach(ColumnSchema col in junctionTableKey.ForeignKeyMemberColumns) { %>
    -            database.AddInParameter(commandWrapper, "@<%=GetPropertyName(col)%>", DbType.<%=col.DataType.ToString()%>, <%=GetFieldName(col)%>);
    +            database.AddInParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(col)%>", DbType.<%=col.DataType.ToString()%>, <%=GetFieldName(col)%>);
                 <% } %>
                
                 IDataReader reader = null;
    @@ -302,10 +303,10 @@
                 <% for(int i = 0; i < SourceTable.PrimaryKey.MemberColumns.Count; i++) {
                     ColumnSchema col = SourceTable.PrimaryKey.MemberColumnsIdea;
                 %>
    -            database.AddInParameter(commandWrapper, "@<%=GetPropertyName(col)%>", DbType.<%=col.DataType%>, <%=GetFieldName(col)%>);
    +            database.AddInParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(col)%>", DbType.<%=col.DataType%>, <%=GetFieldName(col)%>);
                 <% } %>
                 <% if (RowVersion != null){ %>
    -            database.AddInParameter(commandWrapper, "@<%=GetPropertyName(RowVersion)%>", DbType.<%= RowVersion.DataType.ToString() %>, <%= GetFieldName(RowVersion) %>);
    +            database.AddInParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(RowVersion)%>", DbType.<%= RowVersion.DataType.ToString() %>, <%= GetFieldName(RowVersion) %>);
                 <% } %>
                
                 int results = 0;
    @@ -376,10 +377,10 @@
             if (whereClause.IndexOf("OR") > 0) // did they want to do "a=b OR c=d OR..."?
                 searchUsingOR = true;
            
    -        database.AddInParameter(commandWrapper, "@SearchUsingOR", DbType.Boolean, searchUsingOR);
    +        database.AddInParameter(commandWrapper, "<%=PrefijoParametros%>SearchUsingOR", DbType.Boolean, searchUsingOR);
            
         <% foreach(ColumnSchema column in SourceTable.Columns) {%>
    -        database.AddInParameter(commandWrapper, "@<%=GetPropertyName(column)%>", DbType.<%=column.DataType%>, DBNull.Value);
    +        database.AddInParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(column)%>", DbType.<%=column.DataType%>, DBNull.Value);
         <% } %>
        
                 // replace all instances of 'AND' and 'OR' because we already set searchUsingOR
    @@ -400,7 +401,7 @@
                     <% columnName = column.Name.ToLower();
                           columnNameSpace = columnName + " ";
                           columnNameEqual = columnName + "=";
    -                      columnNameParam = "@" + column.Name;
    +                      columnNameParam = PrefijoParametros + column.Name;
                     %>
                     if (clause.Trim().StartsWith("<%=columnNameSpace%>") || clause.Trim().StartsWith("<%=columnNameEqual%>"))
                     {
    @@ -537,7 +538,7 @@
             /// <summary>
             ///     Gets All rows from the DataSource.
             /// </summary>
    -        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
    +        /// <param name="transactionManager"><see cref="TransationManager"/> object</param>
             /// <param name="start">Row number at which to start reading.</param>
             /// <param name="pageLength">Number of rows to return.</param>
             /// <param name="count">out. The number of rows that match this query.</param>
    @@ -605,10 +606,11 @@
                 GenericDatabase database = new GenericDatabase(this._connectionString, _providerFactory);
                 DbCommand commandWrapper = DbCommandProvider.GetCommandWrapper(database, "<%=owner + ProcedurePrefix + commandStem + SelectSuffix + "Paged"%>", _useStoredProcedure, _providerInvariantName, whereClause, orderBy);
                
    -            database.AddInParameter(commandWrapper, "@WhereClause", DbType.String, whereClause);
    -            database.AddInParameter(commandWrapper, "@OrderBy", DbType.String, orderBy);
    -            database.AddInParameter(commandWrapper, "@PageIndex", DbType.Int32, start);
    -            database.AddInParameter(commandWrapper, "@PageSize", DbType.Int32, pageLength);
    +            //jmf : Ojo con el where y el order by.
    +            //database.AddInParameter(commandWrapper, "<%=PrefijoParametros%>WhereClause", DbType.String, whereClause);
    +            //database.AddInParameter(commandWrapper, "<%=PrefijoParametros%>OrderBy", DbType.String, orderBy);
    +            database.AddInParameter(commandWrapper, "<%=PrefijoParametros%>PageIndex", DbType.Int32, start);
    +            database.AddInParameter(commandWrapper, "<%=PrefijoParametros%>PageSize", DbType.Int32, pageLength);
            
                 IDataReader reader = null;
                 bool commitTransaction = false;
    @@ -632,8 +634,7 @@
                     //else
                     //{
                     //    reader = Utility.ExecuteReader(database, commandWrapper);
    -                //}
    -               
    +                //}               
                     Fill(reader, rows, 0, int.MaxValue);
                     //count = rows.Count;
     
    @@ -656,9 +657,11 @@
                 }
                
                 // now we get the count
    +
    +           
                 DbCommand commandWrapperCount = DbCommandProvider.GetCommandWrapper(database, "<%=owner + ProcedurePrefix + commandStem + SelectSuffix + "PagedCount"%>", _useStoredProcedure, _providerInvariantName, whereClause, orderBy);
    -            database.AddInParameter(commandWrapperCount, "@WhereClause", DbType.String, whereClause);
    -            database.AddInParameter(commandWrapperCount, "@OrderBy", DbType.String, orderBy);
    +            //database.AddInParameter(commandWrapperCount, "<%=PrefijoParametros%>WhereClause", DbType.String, whereClause);
    +            //database.AddInParameter(commandWrapperCount, "<%=PrefijoParametros%>OrderBy", DbType.String, orderBy);
                
                 object tmp = Utility.ExecuteScalar(transactionManager, commandWrapperCount);
                 count = Convert.ToInt32(tmp);
    @@ -714,7 +717,7 @@
                 DbCommand commandWrapper = DbCommandProvider.GetCommandWrapper(database, "<%=owner + ProcedurePrefix + commandStem + SelectSuffix + "By" + GetKeysName(fkeys[j].ForeignKeyMemberColumns)%>", _useStoredProcedure, _providerInvariantName);
                
                 <% foreach(ColumnSchema col in fkeys[j].ForeignKeyMemberColumns) { %>
    -                database.AddInParameter(commandWrapper, "@<%=GetPropertyName(col)%>", DbType.<%=col.DataType%>, <%=GetFieldName(col)%>);
    +                database.AddInParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(col)%>", DbType.<%=col.DataType%>, <%=GetFieldName(col)%>);
                 <% } %>
                
                 IDataReader reader = null;
    @@ -813,7 +816,7 @@
                 DbCommand commandWrapper = DbCommandProvider.GetCommandWrapper(database, "<%=owner + ProcedurePrefix + commandStem + SelectSuffix + "By" + GetKeysName(indexes[j].MemberColumns)%>", _useStoredProcedure, _providerInvariantName);
                
                 <% foreach(ColumnSchema col in indexes[j].MemberColumns) { %>
    -                database.AddInParameter(commandWrapper, "@<%=GetPropertyName(col)%>", DbType.<%=col.DataType%>, <%=GetFieldName(col)%>);
    +                database.AddInParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(col)%>", DbType.<%=col.DataType%>, <%=GetFieldName(col)%>);
                 <% } %>
                
                 IDataReader reader = null;
    @@ -872,7 +875,7 @@
         #endregion Get By Index Functions
     <%    }//end if includegetlistbyix
        
    -        /*---------------------------------------------------------------------------------
    +        /*--------------------------------------------------------------------------------
                                     Insert
                                 Single Key, Identity
               -------------------------------------------------------------------------------*/
    @@ -976,16 +979,16 @@
                 for (int i = 0; i < cols.Count; i++)       
                 {    
                     if (RowVersion != null && colsIdea == RowVersion) { %>
    -            //database.AddOutParameter(commandWrapper, "@<%=GetPropertyName(RowVersion)%>", DbType.<%= RowVersion.DataType.ToString() %>, 8);
    +            //database.AddOutParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(RowVersion)%>", DbType.<%= RowVersion.DataType.ToString() %>, 8);
                     <% } else if ( IsComputed(colsIdea) || IsIdentityColumn(colsIdea) ) { %>
    -            //database.AddOutParameter(commandWrapper, "@<%=GetPropertyName(colsIdea)%>", DbType.<%= colsIdea.DataType.ToString() %>, <%= colsIdea.Size.ToString() %>);
    +            //database.AddOutParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(colsIdea)%>", DbType.<%= colsIdea.DataType.ToString() %>, <%= colsIdea.Size.ToString() %>);
                     <%} else {
                         if (colsIdea.AllowDBNull && !IsCSReferenceDataType(colsIdea)  )
                         {
                 // String types are nullable, but all other types are value types %>
    -            database.AddInParameter(commandWrapper, "@<%=GetPropertyName(colsIdea)%>", DbType.<%= colsIdea.DataType.ToString() %>, (entity.<%=GetPropertyName(colsIdea)%>.HasValue ? (object) entity.<%=GetPropertyName(colsIdea)%>  : System.DBNull.Value));
    +            database.AddInParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(colsIdea)%>", DbType.<%= colsIdea.DataType.ToString() %>, (entity.<%=GetPropertyName(colsIdea)%>.HasValue ? (object) entity.<%=GetPropertyName(colsIdea)%>  : System.DBNull.Value));
                         <% } else {%>
    -            database.AddInParameter(commandWrapper, "@<%=GetPropertyName(colsIdea)%>", <%= GetDbType(colsIdea) %>, entity.<%=GetPropertyName(colsIdea)%> );
    +            database.AddInParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(colsIdea)%>", <%= GetDbType(colsIdea) %>, entity.<%=GetPropertyName(colsIdea)%> );
                     <% }
                     }       
                 } // end for
    @@ -1008,33 +1011,40 @@
                
                 // get the updatable columns
                
    -            DbCommand commandWrapper2 = DbCommandProvider.GetCommandWrapper(database, "<%=owner + ProcedurePrefix + commandStem + "Last" +InsertSuffix %>", _useStoredProcedure, _providerInvariantName);
    -            DbDataReader reader = (DbDataReader)Utility.ExecuteReader(transactionManager, commandWrapper2);
    +           
    +            //jmf: Comprobamos si se usa Oracle.
    +            //ODP
    +            <% if (UsandoOracle) { %>
    +                string s = "Estamos trabajando en ello...";
    +            <% } else { %>
    +                DbCommand commandWrapper2 = DbCommandProvider.GetCommandWrapper(database, "<%=owner + ProcedurePrefix + commandStem + "Last" +InsertSuffix %>", _useStoredProcedure, _providerInvariantName);
    +                DbDataReader reader = (DbDataReader)Utility.ExecuteReader(transactionManager, commandWrapper2);
     
    -            if (reader.HasRows)
    -            {
    -                reader.Read();
    -                //entity.Id = (long)reader["Id"];
    -                <%
    -                // Update identity or computed columns
    -                for (int i = 0; i < cols.Count; i++)       
    +                if (reader.HasRows)
                     {
    -                    if (IsComputed(colsIdea) || IsIdentityColumn(colsIdea) )
    +                    reader.Read();
    +                    //entity.Id = (long)reader["Id"];
    +                    <%
    +                    // Update identity or computed columns
    +                    for (int i = 0; i < cols.Count; i++)       
                         {
    -                        string castTo = String.Empty;
    +                        if (IsComputed(colsIdea) || IsIdentityColumn(colsIdea) )
    +                        {
    +                            string castTo = String.Empty;
                            
    -                        if (colsIdea.NativeType == "xml")
    -                            castTo = typeof(System.String).ToString();
    -                        else
    -                            castTo = colsIdea.SystemType.ToString();    %>
    +                            if (colsIdea.NativeType == "xml")
    +                                castTo = typeof(System.String).ToString();
    +                            else
    +                                castTo = colsIdea.SystemType.ToString();    %>
        
    -                entity.<%=GetPropertyName(colsIdea)%> = (<%=castTo%>) reader["<%=colsIdea%>"];                       
    -                    <%}
    +                    entity.<%=GetPropertyName(colsIdea)%> = (<%=castTo%>) reader["<%=colsIdea%>"];                       
    +                        <%}
    +                    }
    +                    %>
                     }
    -                %>
    -            }
    -
    -            reader.Close();
    +                reader.Close();
    +            <% } %>
    +           
                            
                 if (commitTransaction) transactionManager.Commit();
                        
    @@ -1097,12 +1107,12 @@
                     {
                         if (colsIdea.NativeType == "numeric" )
                         {%>
    -            database.AddParameter(commandWrapper, "@<%=GetPropertyName(colsIdea)%>", SqlDbType.<%= colsIdea.DataType.ToString() %>, <%= colsIdea.Size.ToString() %>, ParameterDirection.Output, true, <%= colsIdea.Precision.ToString() %>, <%= colsIdea.Scale.ToString() %>, null, DataRowVersion.Default, null);
    +            database.AddParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(colsIdea)%>", SqlDbType.<%= colsIdea.DataType.ToString() %>, <%= colsIdea.Size.ToString() %>, ParameterDirection.Output, true, <%= colsIdea.Precision.ToString() %>, <%= colsIdea.Scale.ToString() %>, null, DataRowVersion.Default, null);
                 <%
                         }
                         else
                         {%>
    -            database.AddOutParameter(commandWrapper, "@<%=GetPropertyName(colsIdea)%>", DbType.<%= colsIdea.DataType.ToString() %>, <%= colsIdea.Size.ToString() %>);
    +            database.AddOutParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(colsIdea)%>", DbType.<%= colsIdea.DataType.ToString() %>, <%= colsIdea.Size.ToString() %>);
                
                     <%    }
                     }
    @@ -1111,22 +1121,22 @@
                         if (colsIdea.AllowDBNull && !IsCSReferenceDataType(colsIdea)  )
                         {
                             // String types are nullable, but all other types are value types%>
    -            database.AddInParameter(commandWrapper, "@<%=GetPropertyName(colsIdea)%>", DbType.<%= colsIdea.DataType.ToString() %>, (entity.<%=GetPropertyName(colsIdea)%>.HasValue ? (object) entity.<%=GetPropertyName(colsIdea)%> : System.DBNull.Value) );
    +            database.AddInParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(colsIdea)%>", DbType.<%= colsIdea.DataType.ToString() %>, (entity.<%=GetPropertyName(colsIdea)%>.HasValue ? (object) entity.<%=GetPropertyName(colsIdea)%> : System.DBNull.Value) );
                         <%}
                         else               
                     {%>
    -            database.AddInParameter(commandWrapper, "@<%=GetPropertyName(colsIdea)%>", <%=GetDbType(colsIdea) %>, entity.<%=GetPropertyName(colsIdea)%> );
    +            database.AddInParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(colsIdea)%>", <%=GetDbType(colsIdea) %>, entity.<%=GetPropertyName(colsIdea)%> );
                     <%}
                     }
                     if (colsIdea.IsPrimaryKeyMember && !IsComputed(colsIdea) && !IsIdentityColumn(colsIdea) && colsIdea != RowVersion)
                     {%>
    -            database.AddInParameter(commandWrapper, "@Original<%=GetPropertyName(colsIdea)%>", DbType.<%= colsIdea.DataType.ToString() %>, entity.Original<%=GetPropertyName(colsIdea)%>);
    +            database.AddInParameter(commandWrapper, "<%=PrefijoParametros%>Original<%=GetPropertyName(colsIdea)%>", DbType.<%= colsIdea.DataType.ToString() %>, entity.Original<%=GetPropertyName(colsIdea)%>);
                     <%}
                 }
                
                 if (RowVersion != null)
                 {%>
    -            database.AddOutParameter(commandWrapper, "@Returned<%=GetPropertyName(RowVersion)%>", DbType.<%= RowVersion.DataType.ToString() %>, 8);
    +            database.AddOutParameter(commandWrapper, "<%=PrefijoParametros%>Returned<%=GetPropertyName(RowVersion)%>", DbType.<%= RowVersion.DataType.ToString() %>, 8);
                 <%}%>
                
                 int results = 0;
    @@ -1153,7 +1163,7 @@
                     throw new DBConcurrencyException("Concurrency exception");
                 }
            
    -            entity.<%=GetPropertyName(RowVersion)%> = (<%=RowVersion.SystemType.ToString()%>)database.GetParameterValue(commandWrapper, "@Returned<%=GetPropertyName(RowVersion)%>");
    +            entity.<%=GetPropertyName(RowVersion)%> = (<%=RowVersion.SystemType.ToString()%>)database.GetParameterValue(commandWrapper, "<%=PrefijoParametros%>Returned<%=GetPropertyName(RowVersion)%>");
             <%} %>
            
                 // get the updatable columns
    @@ -1161,7 +1171,7 @@
                 DbCommand commandWrapper2 = DbCommandProvider.GetCommandWrapper(database, "<%= ProcedurePrefix + commandStem + SelectSuffix + "By" + GetKeysName(SourceTable.PrimaryKey.MemberColumns) %>", _useStoredProcedure, _providerInvariantName);
                 <% for(int j=0; j<SourceTable.PrimaryKey.MemberColumns.Count; j++)
                 {%>
    -            database.AddInParameter(commandWrapper2, "@<%=GetPropertyName(SourceTable.PrimaryKey.MemberColumns[j])%>", DbType.<%= SourceTable.PrimaryKey.MemberColumns[j].DataType.ToString() %>, entity.<%=GetPropertyName(SourceTable.PrimaryKey.MemberColumns[j])%>);
    +            database.AddInParameter(commandWrapper2, "<%=PrefijoParametros + GetPropertyName(SourceTable.PrimaryKey.MemberColumns[j])%>", DbType.<%= SourceTable.PrimaryKey.MemberColumns[j].DataType.ToString() %>, entity.<%=GetPropertyName(SourceTable.PrimaryKey.MemberColumns[j])%>);
                 <%}%>
     
                 DbDataReader reader = (DbDataReader)Utility.ExecuteReader(transactionManager, commandWrapper2);
    @@ -1255,11 +1265,11 @@
                 DbCommand commandWrapper = database.GetStoredProcCommand("<%=command.Name%>");
                
                 <% foreach(ParameterSchema col in command.InputParameters)    {%>           
    -                database.AddInParameter(commandWrapper, "@<%=GetPropertyName(col)%>", <%=GetDbType(col)%>,  <%=GetFieldName(col)%> );
    +                database.AddInParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(col)%>", <%=GetDbType(col)%>,  <%=GetFieldName(col)%> );
                 <%}%>
        
                 <% foreach(ParameterSchema col in command.AllOutputParameters)    { %>
    -                database.AddParameter(commandWrapper, "@<%=GetPropertyName(col)%>", DbType.<%=col.DataType.ToString()%>, ParameterDirection.InputOutput, "", DataRowVersion.Current,<%=GetFieldName(col)%>);
    +                database.AddParameter(commandWrapper, "<%=PrefijoParametros + GetPropertyName(col)%>", DbType.<%=col.DataType.ToString()%>, ParameterDirection.InputOutput, "", DataRowVersion.Current,<%=GetFieldName(col)%>);
                 <%}%>
                
                 <%
    @@ -1267,8 +1277,8 @@
                 StringBuilder outputValues = new StringBuilder();
                
                 foreach(ParameterSchema outParam in command.AllOutputParameters)
    -            {
    -                outputValues.AppendFormat("\t\t\t{0} =  Utility.GetParameterValue<{1}>(commandWrapper.Parameters[\"@{2}\"]);\n",GetFieldName(outParam), GetCSType(outParam), GetPropertyName(outParam));
    +            { //jmf
    +                outputValues.AppendFormat("\t\t\t{0} =  Utility.GetParameterValue<{1}>(commandWrapper.Parameters[\"PrefijoParametros{2}\"]);\n",GetFieldName(outParam), GetCSType(outParam), GetPropertyName(outParam));
                 }
                 %>
                 <% if (returnType == "DataSet") { %>
    Index: DataAccessLayer.GenericClient/GenericNetTiersProvider.cst
    ===================================================================
    --- DataAccessLayer.GenericClient/GenericNetTiersProvider.cst    (revision 624)
    +++ DataAccessLayer.GenericClient/GenericNetTiersProvider.cst    (working copy)
    @@ -28,6 +28,8 @@
     
     #endregion
     
    +//Fichero: GenericNetTiersProvider.cst
    +
     namespace <%=DALNameSpace%>.GenericClient
     {
         /// <summary>
    Index: DataAccessLayer.GenericClient/System.Data.Oracle.Procedures.cst
    ===================================================================
    --- DataAccessLayer.GenericClient/System.Data.Oracle.Procedures.cst    (revision 0)
    +++ DataAccessLayer.GenericClient/System.Data.Oracle.Procedures.cst    (revision 0)
    @@ -0,0 +1,750 @@
    +<%@ CodeTemplate src="..\TemplateLib\CommonSqlCode.cs" Debug="true" Inherits="MoM.Templates.CommonSqlCode" Language="C#" TargetLanguage="T-SQL"
    +    Description="Generates SELECT/INSERT/UPDATE/DELETE stored procedures based on one or more selected tables, or an entire database schema." ResponseEncoding="UTF-8"%>
    +
    +<%@ Property Name="CompanyName" Optional="True" Type="System.String" Category="General" Description="The name of your company." %>
    +<%@ Property Name="CompanyURL" Optional="True" Type="System.String" Category="General" Description="The URL of your company." %>
    +
    +<%@ Property Name="SourceViews" Type="SchemaExplorer.ViewSchemaCollection" Optional="True" Category="Context" Description="Views that the stored procedures should be based on." %>
    +<%@ Property Name="SourceTables" Type="SchemaExplorer.TableSchemaCollection" Category="Context" Description="Tables that the stored procedures should be based on." %>
    +<%@ Property Name="IncludeDrop" Type="System.Boolean" Default="True" Category="Options" Description=&qu