Table of Contents Previous Next


4 Using the .NET Connector : 4.2 Retrieving Database Records : 4.2.1 Retrieving a Single Database Record

To retrieve a single result from a query, use the ExecuteScalar() method of the EDBCommand object. The ExecuteScalar() method returns the first value of the first column of the first row of the DataSet generated by the specified query.
Please note that the sample includes an explicit conversion of the value returned by the ExecuteScalar() method. The ExecuteScalar() method returns an object; to view the object, you must convert it into an integer value by using the Convert.ToInt32 method.

4 Using the .NET Connector : 4.2 Retrieving Database Records : 4.2.1 Retrieving a Single Database Record

Table of Contents Previous Next