Which code segment should you use?

Your company uses a BizTalk business rule to access insurance rates that change frequently. You want to implement a FactRetriever class to ensure the business rule facts are current. The FactRetriever class contains the following code.

1 public object UpdateFacts(RuleSetInfo rsi, RuleEngine engine, object factsIn) {
2 object factsOut = null;
3 DataConnection dc = null;
4 if (factsIn == null) {
5 SqlConnection con = new SqlConnection ("Integrated Security=SSPI;Initial Catalog=RatesDb;Data Source=RatesSvr;");
6 //— insert lines of code here —-
7 factsOut =dc;
8 } else {
9 factsOut = factsIn;
10 return factsOut; }

You need to complete the FactRetriever class code segment in line 6 to meet the requirement. Which code segment should you use?

Your company uses a BizTalk business rule to access insurance rates that change frequently. You want to implement a FactRetriever class to ensure the business rule facts are current. The FactRetriever class contains the following code.

1 public object UpdateFacts(RuleSetInfo rsi, RuleEngine engine, object factsIn) {
2 object factsOut = null;
3 DataConnection dc = null;
4 if (factsIn == null) {
5 SqlConnection con = new SqlConnection ("Integrated Security=SSPI;Initial Catalog=RatesDb;Data Source=RatesSvr;");
6 //— insert lines of code here —-
7 factsOut =dc;
8 } else {
9 factsOut = factsIn;
10 return factsOut; }

You need to complete the FactRetriever class code segment in line 6 to meet the requirement. Which code segment should you use?

A.
DataTable dt = new DataTable ("Rates");dc = new DataConnection("RatesDb", dt, con);engine.Assert(dt);

B.
DataSet ds = new DataSet("Rates");dc = new DataConnection("RatesDb", "Rates", con);dc.Fill(ds);engine.Assert(ds);

C.
dc = new DataConnection("RatesDb", "Rates", con);engine.Assert(dc);

D.
DataSet dsRates = new DataSet("Rates");dc = new DataConnection("RatesDb", dsRates.Tables(Rates).TableName, con);engine.Assert(dc);



Leave a Reply 0

Your email address will not be published. Required fields are marked *