daEmployees.InsertCommand = New SqlCommand()
With daEmployees.InsertCommand
.Connection = conn
.CommandType = CommandType.StoredProcedure.CommandText = "InsertEmployee"
End With
param = daEmployees.InsertCommand.Parameters.Add(_
New SqlParameter(@FirstName
param.Direction = ParameterDirection.Input
param.SourceColumn = "FirstName"
param.SourceVersion = DataRowVersion.Current
param = daEmployees.InsertCommand.Parameters.Add( _
New SqlParameter("@LastName", SqlDbType.VarChar, 70))
param.Direction = ParameterDirection.Input
param.SourceColumn = "LastName"
param.SourceVersion = DataRowVersion.Current
param = daEmployees.InsertCommand.Parameters.Add(_
New SqlParameter("@DepartmentID, SqlDbType.Int))
param.Direction = ParameterDirection.Input
param.SourceColumn = "DepartmentID"
param.SourceVersion = DataRowVersion.Current
param = daEmployees.InsertCommand.Parameters.Add( _
New SqlParameter("@Salary", SqlDbType.Money))
param.Direction = ParameterDirection.Input
param.SourceColumn = "Salary"
param.SourceVersion = DataRowVersion.Current
' Создание специализированной
' хранимой процедуры для команды Update.
daEmployees.UpdateCommand = New SqlCommand()
With daEmployees.UpdateCommand
.Connection = conn