パラメータ名、データ型、長さ、およびソース列名を指定して、OdbcParameter クラスの新しいインスタンスを初期化します。
名前空間: System.Data.Odbc
アセンブリ: System.Data (system.data.dll 内)
構文
'宣言
Public Sub New ( _
name As String, _
type As OdbcType, _
size As Integer, _
sourcecolumn As String _
)
'使用
Dim name As String
Dim type As OdbcType
Dim size As Integer
Dim sourcecolumn As String
Dim instance As New OdbcParameter(name, type, size, sourcecolumn)
public OdbcParameter (
string name,
OdbcType type,
int size,
string sourcecolumn
)
public:
OdbcParameter (
String^ name,
OdbcType type,
int size,
String^ sourcecolumn
)
public OdbcParameter (
String name,
OdbcType type,
int size,
String sourcecolumn
)
public function OdbcParameter (
name : String,
type : OdbcType,
size : int,
sourcecolumn : String
)
パラメータ
- name
パラメータの名前。
- type
OdbcType 値の 1 つ。
- size
パラメータの長さ。
- sourcecolumn
ソース列の名前。
例外
例外の種類 | 条件 |
---|---|
type パラメータで指定された値は、無効なバックエンド データ型です。 |
使用例
OdbcParameter を作成し、そのプロパティの一部を設定する例を次に示します。
Public Sub CreateOdbcParameter()
Dim parameter As New OdbcParameter("Description", OdbcType.VarChar, 88, "Description")
parameter.Direction = ParameterDirection.Output
End Sub
public void CreateOdbcParameter()
{
OdbcParameter parameter = new OdbcParameter("Description",OdbcType.VarChar,
88,"Description");
parameter.Direction = ParameterDirection.Output;
}
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 2.0、1.1
参照
関連項目
OdbcParameter クラス
OdbcParameter メンバ
System.Data.Odbc 名前空間