>CREATE PROCEDURE [dbo].[Fill_lookup_manager] >AS > BEGIN > > > >-- 1 Retrieve the code data result set > SELECT code.ckey, > code.clockey, > code.ccodetype, > code.cdescription, >... > code.[timestamp] > FROM code > ORDER BY ccodetype > >-- 2 Retrieve the agent data result set > SELECT agent.ckey, > agent.caddinskey, > agent.clockey, > agent.cfileas, > agent.ccompany, > ... > agent.[timestamp] > FROM agent > ORDER BY ccompany ; > >-- 3 Retrieve the association data result set > SELECT association.ckey, > association.clockey, > association.ccode, > association.cname, > ... > association.[timestamp] > FROM association > ORDER BY cname ; > >-- 4 Retrieve the broker data result set > SELECT broker.ckey, > broker.clockey, > broker.cinfotokey, > broker.cfileas, > broker.csalutation, > ... > broker.[timestamp], > ( SELECT cdescription > FROM code > WHERE broker.cinfotokey = code.ckey > ) AS cinfoto > FROM broker > ORDER BY ccompany ; >... >>
> '-- use sproc to fill em all > Using cmd As New SqlCommand("dbo.fill_lookup_manager") If you specified the command here, does the setting CommandText become redundant? > cmd.CommandType = CommandType.StoredProcedure > cmd.CommandText = "fill_lookup_manager" > BusinessLayer.FillMultipleDataTables(cmd, _ > _code, _agent, _association, _broker, _carrier, _ > _ccagent, _ccarrier, _ccassociation, _cccdiscount, _ccchaggrat, _ > _ccchazard, _ccchcomponent, _ccchdeductible, _ccchdiscount, _ccchexplvl, _ > _ccchinccov, _ccchperil, _cccomponent, _cccoverage, _cccperil, _ > _ccendfee, _ccendorsement, _ccendtodo, _ccfee, ccfinopt, _ > _ccmga, _classtype, _codetype, _finopt, _location, _ > _mga, _nextnumbers, _taxclass, _taxcoverage, _taxjuris) > End Using >>