OdbcCommand Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the OdbcCommand class.
Overloads
OdbcCommand() |
Initializes a new instance of the OdbcCommand class. |
OdbcCommand(String) |
Initializes a new instance of the OdbcCommand class with the text of the query. |
OdbcCommand(String, OdbcConnection) |
Initializes a new instance of the OdbcCommand class with the text of the query and an OdbcConnection object. |
OdbcCommand(String, OdbcConnection, OdbcTransaction) |
Initializes a new instance of the OdbcCommand class with the text of the query, an OdbcConnection object, and the Transaction. |
OdbcCommand()
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
Initializes a new instance of the OdbcCommand class.
public:
OdbcCommand();
public OdbcCommand ();
Public Sub New ()
Remarks
The base constructor initializes all fields to their default values. The following table shows initial property values for an instance of OdbcCommand.
Properties | Initial Value |
---|---|
CommandText | empty string ("") |
CommandTimeout | 30 |
CommandType | Text |
Connection | null |
See also
Applies to
OdbcCommand(String)
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
Initializes a new instance of the OdbcCommand class with the text of the query.
public:
OdbcCommand(System::String ^ cmdText);
public OdbcCommand (string? cmdText);
public OdbcCommand (string cmdText);
new System.Data.Odbc.OdbcCommand : string -> System.Data.Odbc.OdbcCommand
Public Sub New (cmdText As String)
Parameters
- cmdText
- String
The text of the query.
See also
Applies to
OdbcCommand(String, OdbcConnection)
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
Initializes a new instance of the OdbcCommand class with the text of the query and an OdbcConnection object.
public:
OdbcCommand(System::String ^ cmdText, System::Data::Odbc::OdbcConnection ^ connection);
public OdbcCommand (string? cmdText, System.Data.Odbc.OdbcConnection? connection);
public OdbcCommand (string cmdText, System.Data.Odbc.OdbcConnection connection);
new System.Data.Odbc.OdbcCommand : string * System.Data.Odbc.OdbcConnection -> System.Data.Odbc.OdbcCommand
Public Sub New (cmdText As String, connection As OdbcConnection)
Parameters
- cmdText
- String
The text of the query.
- connection
- OdbcConnection
An OdbcConnection object that represents the connection to a data source.
See also
Applies to
OdbcCommand(String, OdbcConnection, OdbcTransaction)
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
- Source:
- OdbcCommand.cs
Initializes a new instance of the OdbcCommand class with the text of the query, an OdbcConnection object, and the Transaction.
public:
OdbcCommand(System::String ^ cmdText, System::Data::Odbc::OdbcConnection ^ connection, System::Data::Odbc::OdbcTransaction ^ transaction);
public OdbcCommand (string? cmdText, System.Data.Odbc.OdbcConnection? connection, System.Data.Odbc.OdbcTransaction? transaction);
public OdbcCommand (string cmdText, System.Data.Odbc.OdbcConnection connection, System.Data.Odbc.OdbcTransaction transaction);
new System.Data.Odbc.OdbcCommand : string * System.Data.Odbc.OdbcConnection * System.Data.Odbc.OdbcTransaction -> System.Data.Odbc.OdbcCommand
Public Sub New (cmdText As String, connection As OdbcConnection, transaction As OdbcTransaction)
Parameters
- cmdText
- String
The text of the query.
- connection
- OdbcConnection
An OdbcConnection object that represents the connection to a data source.
- transaction
- OdbcTransaction
The transaction in which the OdbcCommand executes.
Remarks
The following table shows initial property values for an instance of this implementation of the OdbcCommand.
Properties | Initial Value |
---|---|
CommandText | cmdText |
CommandTimeout | 30 |
CommandType | Text |
Connection | A new OdbcConnection that is the value for the connection parameter. |
You can change the value for any one of these parameters by setting the related property.
See also
Applies to
.NET