C# // ----- Build the selection query. SqlDataAdapter unitAdapter = new SqlDataAdapter(); SqlCommand unitCommand = new SqlCommand( "SELECT * FROM UnitOfMeasure", linkToDB); = unitCommand; // ----- Build the insertion query. unitCommand = new SqlCommand( @"INSERT INTO UnitOfMeasure (ShortName, FullName) VALUES (@ShortName, @FullName); SET @ID = @@IDENTITY;", linkToDB); ("@ShortName", , 15, "ShortName"); ("@FullName", , 50, "FullName"); SqlParameter param = ("@ID", , 0, "ID"); = ; = unitCommand; // ----- Build the revision query. unitCommand = new SqlCommand( @"UPDATE UnitOfMeasure SET ShortName = @ShortName, FullName = @FullName WHERE ID = @ID", linkToDB); ("@ShortName", , 15,. | 176 Microsoft 4 Step by Step C ----- Build the selection query. SqlDataAdapter unitAdapter new SqlDataAdapter SqlCommand unitCommand new SqlCommand SELECT FROM UnitOfMeasure linkToDB unitCommand ----- Build the insertion query. unitCommand new SqlCommand @ INSERT INTO UnitOfMeasure ShortName FullName VALUES @ShortName @FullName SET @ID @@IDENTITY linkToDB @ShortName 15 ShortName @FullName 50 FullName SqlParameter param @ID 0 ID unitCommand ----- Build the revision query. unitCommand new SqlCommand @ UPDATE UnitOfMeasure SET ShortName @ShortName FullName @FullName WHERE ID @ID linkToDB @ShortName 15 ShortName @FullName 50 FullName param @ID 0 ID unitCommand ----- Build the deletion query. unitCommand new SqlCommand DELETE FROM UnitOfMeasure WHERE ID @ID linkToDB param @ID 0 ID unitCommand Chapter 11 Making External Data Available Locally 177 Visual Basic ----- Build the selection query. Dim unitAdapter As New SqlDataAdapter Dim unitCommand As New SqlCommand SELECT FROM UnitOfMeasure linkToDB unitCommand ----- Build the insertion query. unitCommand New SqlCommand INSERT INTO UnitOfMeasure ShortName FullName VALUES @ShortName @FullName SET @ID @@IDENTITY linkToDB @ShortName 15 ShortName @FullName 50 FullName With @ID 0 ID .Direction End With