Friday, June 18, 2010

Nettiers MYSQL Template.

After a long time i am back in my blog. You will be happy to know that i came with the solution of nettiers integration template with mysql. Please follow the following guide lines to use it.


Prerequisite:

  1. Please go to the sun website download and install the latest connector of mysql. ( i guess currently it is 6.2 ).
  2. If you want to check it locally then install the mysql server 5.1 or later and you can use sql yog 8.3 for mysql management studio.
  3. This template only works with latest versions of codesmith i.e 5.2 or later as it has a complete provider of mysql.
Creating a new database in mysql.
  1. While creating a new database please make sure that you have set its engine to innodb to make the database relational.
  2. Create the database , tables ,index and relations between the table.
  3. Currently all the native types used in MS-SQL are working in mysql template. other types can produce the error.
  4. Once you create the database you are ready to generate its classes now.
Download:
Click Here to download its beta version.

Note: You are all welcome to report its bugs and errors because this is not a fully tested version. I appreciate the community help and guidance in creating this template specially Blake Niemyjski.


for discussions and help please follow the official forum link below.
http://code.google.com/p/nettiers/issues/detail?id=19


If you are using ms-sql nettiers template, please update the template to latest version and apply the patch which i have provided on above link.


Umar .




Bookmark and Share

Tuesday, January 26, 2010

Nettiers Command Timeout problem

I have been facing this problem usually when the database size increases and couple a parallel calls to sqlserver are sent for query then this problem can occur. I dig out the problem by googling it but did not find any solution without changing its source code i.e use the commandtimeout  in command wrapper as described in the following link.
http://nettiers.com/FrequentlyAskedQuestions.ashx#I_set_the_codeNetTiersProviderDefaultCommandTimeoutcode_property_so_why_does_my_slow_Sproc_time_out_using_the_SQL_provider_8

We can change the template at all.After completing a huge application. After looking into this problem a lot. i reached at the solution.Nettiers structure use the defaultcommandtimeout property in the provider class which is exactly 30 by default retrieved from the template we people used usually. OK there is no problem at all.Only one thing that we have to use to set this property.i.e just to add the defaultcommandtimeout property to providers settings.

Just replace the below providers settings of the configuration file

   
     
           type="Northwind.Data.SqlClient.SqlNetTiersProvider, Northwind.Data.SqlClient"
           connectionStringName="netTiersConnectionString"
           providerInvariantName="System.Data.SqlClient"
           entityFactoryType="Northwind.Entities.EntityFactory"
           useEntityFactory="true"
           enableEntityTracking="false"
           enableMethodAuthorization="false"
           useStoredProcedure="false" />
   

 

with

   
     
           type="Northwind.Data.SqlClient.SqlNetTiersProvider, Northwind.Data.SqlClient"
           connectionStringName="netTiersConnectionString"
           providerInvariantName="System.Data.SqlClient"
           entityFactoryType="Northwind.Entities.EntityFactory"
           useEntityFactory="true"
           enableEntityTracking="false"
           enableMethodAuthorization="false"
           defaultCommandTimeout="180"
           useStoredProcedure="false" />
   

 

Change the defaultCommandTimeout according to your need


Umar 






Bookmark and Share