Đang chuẩn bị liên kết để tải về tài liệu:
Professional ASP.NET 1.0 Special Edition- P18
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Professional ASP.NET 1.0 Special Edition- P18:Those of us who are Microsoft developers can't help but notice that .NET has received a fair amount of visibility over the last year or so. This is quite surprising considering that for most of this period, .NET has been in its early infancy and beta versions. I can't remember any unreleased product that has caused this much interest among developers. And that's really an important point, because ignoring all the hype and press, .NET really is a product for developers, providing a great foundation for building all types of applications | value of the column and not the Original value Dim objInsertCommand As New OleDbCommand BookAuthorInsert objConnect objInsertCommand.CommandType CommandType.StoredProcedure objParam objInsertCommand.Parameters.Add ISBN OleDbType.VarChar 12 objParam.Direction ParameterDirection.Input objParam.SourceColumn ISBN objParam.SourceVersion DataRowVersion.Current objParam objInsertCommand.Parameters.Add Title OleDbType.VarChar 100 objParam.Direction ParameterDirection.Input objParam.SourceColumn Title objParam.SourceVersion DataRowVersion.Current objParam objInsertCommand.Parameters.Add PublicationDate OleDbType.DBDate objParam.Direction ParameterDirection.Input objParam.SourceColumn PublicationDate objParam.SourceVersion DataRowVersion.Current objParam objInsertCommand.Parameters.Add FirstName OleDbType.VarChar 50 objParam.Direction ParameterDirection.Input objParam.SourceColumn FirstName objParam.SourceVersion DataRowVersion.Current objParam objInsertCommand.Parameters.Add LastName OleDbType.VarChar 50 objParam.Direction ParameterDirection.Input objParam.SourceColumn LastName objParam.SourceVersion DataRowVersion.Current And finally we can specify that this Command object is the insert command by assigning it to the DataAdapter object s Insertcommand property objDataAdapter.InsertCommand objInsertCommand Creating the DeleteCommand Parameters The third and final stored procedure is used to delete rows from the source table. It requires three parameters that specify the Original row values and the code to create them is very similar to that we ve just been using with the other Command objects Dim objDeleteCommand As New OleDbCommand BookAuthorDelete objConnect objDeleteCommand.CommandType CommandType.StoredProcedure objParam objDeleteCommand.Parameters.Add ISBN OleDbType.VarChar 12 objParam.Direction ParameterDirection.Input objParam.SourceColumn ISBN objParam.SourceVersion DataRowVersion.Original objParam objDeleteCommand.Parameters.Add FirstName OleDbType.VarChar 50 .