Start Not updating access query for null

Not updating access query for null

Abstract: Highlights a little-known feature in Access, where related records can be automatically set to Null rather than deleted when the primary record is deleted.

Cascade-to-Null was introduced six years ago, but has remained below the radar for most developers.

For more information, see Merging Data Set Contents and Handling Data Adapter Events.

The following examples demonstrate how to perform updates to modified rows by explicitly setting the Private Sub Adapter Update(By Val connection String As String) Using connection As Sql Connection = New Sql Connection( _ connection String) Dim adapter As Sql Data Adapter = New Sql Data Adapter( _ "SELECT Category ID, Category Name FROM dbo. Update Command = New Sql Command( _ "UPDATE Categories SET Category Name = @Category Name " & _ "WHERE Category ID = @Category ID", connection) adapter.

As the example below demonstrates, the code is very simple.


 
Dzisiaj jest:
06-Nov-2016 08:11