Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Executes a SQL query that returns a list of rows as the result.
Namespace: WebMatrix.Data
Assembly: WebMatrix.Data (in WebMatrix.Data.dll)
Syntax
'Declaration
Public Function Query ( _
commandText As String, _
ParamArray parameters As Object() _
) As IEnumerable(Of Object)
'Usage
Dim instance As Database
Dim commandText As String
Dim parameters As Object()
Dim returnValue As IEnumerable(Of Object)
returnValue = instance.Query(commandText, _
parameters)
public IEnumerable<Object> Query(
string commandText,
params Object[] parameters
)
public:
IEnumerable<Object^>^ Query(
String^ commandText,
... array<Object^>^ parameters
)
member Query :
commandText:string *
parameters:Object[] -> IEnumerable<Object>
public function Query(
commandText : String,
... parameters : Object[]
) : IEnumerable<Object>
Parameters
- commandText
Type: System.String
The SQL query to execute.
- parameters
Type: System.Object[]
(Optional) Parameters to pass to the SQL query.
Return Value
Type: System.Collections.Generic.IEnumerable<Object>
The rows returned by the SQL query.