Jump to content

Documentation for UpgradeHelper projects


Recommended Posts


Do you have any documentation for UpgradeHelper projects? 

I just had an issue with ADORecordSetHelper.getCommandType function. Our project calls stored procedures without "exec" keyword. getCommandType function is trying to load db schema in order to identify CommandType. Each query loads about 10 times slower with this function. You normally don't see the difference if the form is using couple of SP calls, but on heavy DB forms the difference could be several seconds! getCommandType function even after loading DB schema still ignores SPs and assigns default "Text" type to CommandType. It would've been nice to know before that we don't need this function since it assigns "Text" type to all DB calls anyway.

Link to comment
Share on other sites

  • Mobilize.Net Staff

Hello Michael,

In my understanding, the recordset is populated by executing a stored-procedure. Could you provide us a quick sample of how the recordset is populated? If you use the "exec" keyword when executing stored procedures the results is the expected?

Link to comment
Share on other sites

I get expected results with or without "exec" keyword. It's just with "exec" keyword I get results 10 times faster. With "exec" keyword the code enters first "if" statement in getCommandType function and exits function right away. Without "exec" keyword the code continues to get DB schema which takes long time. Like I said before, It would be nice to have some documentation to better understand if some functions needs to be modified/removed in UpgradeHelper projects.

Here is the sample code that I use to populate recordset:

            ADORecordSetHelper rs = new ADORecordSetHelper("");
            DbConnection connCurrent = UpgradeHelpers.DB.AdoFactoryManager.GetFactory().CreateConnection();

            rs.CursorLocation = mCursorLocation;
            connCurrent.ConnectionString = ConnectionString;
            DbCommand TempCommand = null;
            TempCommand = connCurrent.CreateCommand();
            TempCommand.CommandText = "SET ANSI_WARNINGS OFF";
            rs.Open(SQLQuery, connCurrent, mLockType);
            rs.ActiveConnection = null;
            connCurrent = null;
            return rs;


Link to comment
Share on other sites

  • Mobilize.Net Staff

You can find inline documentation in the helper classes and you're also free to edit them. The recordset helper tries to infer the right command type, but when the basic clauses are not fulfilled it has to get the database schema to find if the recordset is populated by querying to a table name. Retrieving the schema has a very important impact on the performance, so in this case modifying the source code by using the exec keyword would help to reduce the performance.



Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use