DataDirect Connect ADO.NET DB2 Entity Provider Supports Conf

Posted by Avadhoot Kulkarni on 30-Apr-2015 06:25

Good news for all who are stuck with short identifier names with our DB2 Entity Framework Provider.

Recently we have released a patch for our DB2 Entity Framework Provider, which allows you to choose the Max identifier Length you want the Provider to use. This will impact the identifier names used in the DDLs of Code First/Code First Migrations and Model First database generation. It will also have an impact on the Identifier names used in normal SQL query translation from LINQ or Entity SQL to normal SQL.

For some background;

DataDirect Connect for ADO.NET DB2 Provider had its Max identifier Length set to 30. So, during Code First or model First application, our DB2 Entity ADO.NET Provider was converting the identifiers with Name longer than 30 characters to a partially readable unique name with length of 30 characters. And it was used in the DDLs to create the backend Table Structure.

Provider is intelligent enough to identify this identifier during the SQL query formation; was able to translate the Identifier names in your LINQ or Entity SQL code to the new matching unique name with the 30 character length.

Worried? Don't be. If you do not want the Provider to change its behaviour and are happy with the 30 characters limit on the identifier length imposed by the DataDirect Connect for ADO.NET Db2 Entity Provider; you have nothing to worry about. Just skip this entire article and your 4.1 provider will keep running as it is.

But, if you find you are limited with this number 30, you can now break these shackles. Here are the steps for your liberation.

Download the Latest patch from our support site using your customer login id and password. Once you install the latest patch just add following entry in app.config file of your .NET Application or web.config of your ASP.NET application.

<ddtek.db2.entity maxIdentifierLength="128" />

And run your application to see the magic work. Now you can use the Maximum Identifier length supported by your backend data-source. Currently DB2 for i V6R1 and above are supporting identifier names up to length 128. But if later versions start supporting longer names; don’t stress, Just increase the number in app.config and utilize the full length.

Hope you are enjoying the fun of Programming with DataDirect Connect for ADO.NET Drivers. Cheers!!!

All Replies

Posted by jrachama on 14-Dec-2015 02:42

This feature is available in 4.2 GA release and the default value for maxIdentifierLength is 128.

Thanks & Regards,

Jyothsna

This thread is closed