Searching for "retrieve"

Q:

In the following question, some part of the sentence may have errors. Find out which part of the sentence has an error and select the appropriate option. If a sentence is free from error, select 'No Error'.

Their luggages which were(A)/kept at the station's(B)/ restroom's lockers, were later retrieved.(C)/No error(D)

A) A B) B
C) C D) D
 
Answer & Explanation Answer: A) A

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: AIEEE , Bank Exams , CAT , GRE

Q:

Write code snippet to retrieve IMEI number of Android phone?

Answer

TelephonyManager class can be used to get the IMEI number. It provides access to information about the telephony services on the device.


Code


        TelephonyManager mTelephonyMgr = (TelephonyManager)


        getSystemService(Context.TELEPHONY_SERVICE);


        String imei = mTelephonyMgr.getDeviceId();

Report Error

View answer Workspace Report Error Discuss

Q:

Explain how to limit the rows that are retrieved by a query.

Answer

The number of rows returned by a select query can be restricted by the LIMIT clause.
Example:
SELECT * from employee
LIMIT 20

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

Q:

How can I retrieve values from one database server and store them in other database server using PHP?

Answer

we can always fetch from one database and rewrite to another. Here is a nice solution of it.$db1 = mysql_connect("host","user","pwd")
mysql_select_db("db1", $db1);
$res1 = mysql_query("query",$db1);$db2 = mysql_connect("host","user","pwd")
mysql_select_db("db2", $db2);
$res2 = mysql_query("query",$db2);At this point you can only fetch records from you previous ResultSet, i.e $res1 – But you cannot execute new query in $db1, even if you supply the link as because the link was overwritten by the new db.so at this point the following script will fail
$res3 = mysql_query("query",$db1); //this will failSo how to solve that?

take a look below.
$db1 = mysql_connect("host","user","pwd")
mysql_select_db("db1", $db1);
$res1 = mysql_query("query",$db1);

$db2 = mysql_connect("host","user","pwd", true)
mysql_select_db("db2", $db2);
$res2 = mysql_query("query",$db2);

So mysql_connect has another optional boolean parameter which indicates whether a link will be created or not, as we connect to the
$db2 with this optional parameter set to 'true', so both link will remain live.

Now the following query will execute successfully.
$res3 = mysql_query("query",$db1);

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

Q:

You use Microsoft Visual Studio 2010 and Microsoft ADO.NET Framework 4 to create an application. The application connects to a Microsoft SQL Server 2008 database. You use the ADO.NET LINQ to SQL model to retrieve data from the database. You use stored procedures to return multiple result sets. You need to ensure that the result sets are returned as strongly typed values. What should you do?

A) Apply the FunctionAttribute and ResultTypeAttribute to the stored procedure function. Use the GetResult B) Apply the FunctionAttribute and ParameterAttribute to the stored procedure function and directly access the strongly typed object from the results collection.
C) Apply the ResultTypeAttribute to the stored procedure function and directly access the strongly typed object from the results collection. D) Apply the ParameterAttribute to the stored procedure function. Use the GetResult
 
Answer & Explanation Answer: A) Apply the FunctionAttribute and ResultTypeAttribute to the stored procedure function. Use the GetResult

Explanation:
Report Error

View Answer Report Error Discuss

Q:

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application uses the ADO.NET Entity Framework to model entities. The application allows users to make changes to entities while disconnected from the central data store.

 

You need to ensure that when the user connects to the central data store and retrieves new data, the application meets the following requirements:

  • Changes made to the local data store in disconnected mode are preserved.
  • Entities that have already been loaded into the local data store, but have not been modified by the user, are updated with the latest data.

What should you do?

A) Call the query's Execute method by using the MergeOptions.AppendOnly option. B) Call the query's Execute method by using the MergeOptions.OverwriteChanges option.
C) Call the Refresh method of ObjectContext by using the RefreshMode.StoreWins option. D) Call the Refresh method of ObjectContext by using the RefreshMode.ClientWins method.
 
Answer & Explanation Answer: D) Call the Refresh method of ObjectContext by using the RefreshMode.ClientWins method.

Explanation:
Report Error

View Answer Report Error Discuss

Q:

You plan to deploy your ASP.NET application over XYZ’s intranet. The application uses data retrieved from a Microsoft SQL Server database. You want to use SQL Server connection pooling to optimize performance. You also need to protect confidential data stored on the server while minimizing administrative costs.

 

You need to configure security for your application. What should you do?

A) Use Microsoft Windows authentication in the application. Enable impersonation for users to access the SQL Server database from your application. B) Use Microsoft Windows authentication in the application. Use a single Windows account for users to access the SQL Server database from your application.
C) Use form-based authentication in the application. Use the system administrator (sa) SQL Server login for users to access the SQL Server database from your application. D) Use form-based authentication in the application. Assign each user a separate SQL Server login to use to access the SQL Server database from your application.
 
Answer & Explanation Answer: B) Use Microsoft Windows authentication in the application. Use a single Windows account for users to access the SQL Server database from your application.

Explanation:

We should only use one account to access the SQL Server database. This ensures that connection pooling is optimized.

 

Incorrect Answers:

A: We should only use a single account to access the SQL Server database.

C: Form-based authentication is less secure. Furthermore, running as the System Administrator with the sa login would compromise security.

D: Form-based authentication is less secure. Furthermore, creating a separate SQL Server login for each user is a daunting administrative task.

Report Error

View Answer Report Error Discuss

Q:

You are creating an ASP.NET application for XYZ. The company data is stored in a Microsoft SQL Server 6.5 database. Your application generates accounting summary reports based on transaction tables that contain million of rows.


You want your application to return each summary report as quickly as possible. You need to configure your application to connect to the database and retrieve the data in a away that achieves this goal.


What should you do?

A) Use a SqlConnection object to connect to the database, and use a SqlCommand object to run a stored procedure that returns the data. B) Use an OleDbConnection object to connect to the database, and use an OleDbCommand object to run a stored procedure that returns the data.
C) Configure SQL Server to support HTTP access, and create an XML template to run a stored procedure that returns the data in XML format. D) Use COM interop to create an ADODB.Connection object, and use an ADODB.Command object to run a SQL statement that returns the data.
 
Answer & Explanation Answer: B) Use an OleDbConnection object to connect to the database, and use an OleDbCommand object to run a stored procedure that returns the data.

Explanation:

We need to use an OleDBConnection to connect to SQL Server Version 6.5 (or earlier). 

 

Incorrect Answers:

 

A: We could use a SqlConnection object only if the SQL Server were SQL Server 7.0, 2000 or later.

 

C: HTTP functionality is not required in this scenario. It would introduce unnecessary overhead.

 

D: ADODB is a legacy standard and should not be used here

Report Error

View Answer Report Error Discuss