Chapter 16 Database Programming with SQL Server and ADO.Net
I am working through Beginning Visual Basic 2012 (ISBN 978-10118-31181-3 54499). In Chapter 16 pages 555 thru 557, both the printed code and the downloaded code provided for Adding, Updating and Deleting Records throw a common error - "Option Strict On Disallows Late Binding on the following statements:
Adding Records
' Parameter for the au_id column..
objCommand.Parameters.AddWithValue
("@au_id",("@au_id"), BindingContext(objDataView).Current("au_id"))
Updating Records
' Parameter for the title_id field..
objCommand.Parameters.AddWithValue _
("@title_id", BindingContext(objDataView).Current("title_id"))
Deleting Records
' Parameter for the title_id field..
objCommand.Parameters.AddWithValue _
("@title_id", BindingContext(objDataView).Current("title_id"))
I want to keep the Strict On setting. How do I change the code to accommodate?
|