Add an input paramater, passing DBNull for null paramater values

Namespace: Caisis.DataAccess
Assembly: Caisis.DataAccess (in Caisis.DataAccess.dll) Version: 4.0.4947.22627

Syntax

C#
public static void AddInputParam(
	SqlCommand cmd,
	string key,
	Object val,
	bool nullable
)
Visual Basic
Public Shared Sub AddInputParam ( 
	cmd As SqlCommand,
	key As String,
	val As Object,
	nullable As Boolean
)
Visual C++
public:
static void AddInputParam(
	SqlCommand^ cmd, 
	String^ key, 
	Object^ val, 
	bool nullable
)

Parameters

cmd
Type: System.Data.SqlClient..::..SqlCommand
The SQL command
key
Type: System..::..String
The name of the paramater, "@" will be prepended to param name
val
Type: System..::..Object
The value of the paramater, NULL -> DBNull
nullable
Type: System..::..Boolean
Indicate whether the input param accepts NULL param values

See Also