Database.QueryValue Method
Executes a SQL query that returns a single scalar value as the result.
Namespace: WebMatrix.Data
Assembly: WebMatrix.Data (in WebMatrix.Data.dll)
Syntax
'Declaration
Public Function QueryValue ( _
commandText As String, _
ParamArray args As Object() _
) As Object
'Usage
Dim instance As Database
Dim commandText As String
Dim args As Object()
Dim returnValue As Object
returnValue = instance.QueryValue(commandText, _
args)
public Object QueryValue(
string commandText,
params Object[] args
)
public:
Object^ QueryValue(
String^ commandText,
... array<Object^>^ args
)
member QueryValue :
commandText:string *
args:Object[] -> Object
public function QueryValue(
commandText : String,
... args : Object[]
) : Object
Parameters
- commandText
Type: System.String
The SQL query to execute.
- args
Type: System.Object[]
(Optional) Parameters to pass to the SQL query.
Return Value
Type: System.Object
The scalar value returned by the SQL query.