migration v2.6 to v4.1

Posts   
 
    
Pablo
User
Posts: 81
Joined: 21-Mar-2005
# Posted on: 19-Nov-2013 11:26:22   

Hello, Sorry, still in the middle of doing a migration ...

Somewhere in my code I found this:

DbUtils.CallRetrievalStoredProcedure("sp_spaceused", parms, spaceUsedDataSet, null);

Used to work like a charm ... now it doesn't anymore. DBUtils is unknown. Any additional references required?

Thans in advance, Paul

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39613
Joined: 17-Aug-2003
# Posted on: 19-Nov-2013 11:46:03   

Please see: http://www.llblgen.com/documentation/4.1/LLBLGen%20Pro%20RTF/hh_goto.htm#migratingcode.htm

and scroll down to the breaking changes enlisted for v3.0. It's recommended you take a look at this list so you know what to expect.

SelfServicing: DbUtils has been removed. The static settings and methods are moved to the DaoBase class. The Db specific methods for sqlserver, like SetArithAbortFlag and SetSqlserverCompatibilityLevel are moved to the new class CommonDaoBase, which is located in the DaoClasses namespace. As DbUtils' public properties are not used frequently in an application, breaking code is minimal: rename the call / reference to the DbUtils member to a call to the CommonDaoBase class method / property instead. The DbUtils.CreateTransaction(3) method has been removed (there's no replacement in CommonDaoBase). The reason is that 'name' is no longer used. Use the overload which don't accept a name. This method also has been moved to DaoBase / IDao and is now no longer static. It's not likely you use this method in practice.

Frans Bouma | Lead developer LLBLGen Pro
Pablo
User
Posts: 81
Joined: 21-Mar-2005
# Posted on: 19-Nov-2013 13:09:40   

... thanks ... sorry for not seeing that, I did scan that page when I started, but did not recheck it when I ran into the dbutils thing.

Results in:


DataSet spaceUsedDataSet = new DataSet();
SqlParameter[] parms = new SqlParameter[0];
CommonDaoBase c = new CommonDaoBase();
c.CallRetrievalStoredProcedure("sp_spaceused", parms, spaceUsedDataSet, null);