업데이트: 2007년 11월
네임스페이스:
System.Data
어셈블리:
System.Data(System.Data.dll)
Public Function GetChanges ( _
rowStates As DataRowState _
) As DataTable
Dim instance As DataTable
Dim rowStates As DataRowState
Dim returnValue As DataTable
returnValue = instance.GetChanges(rowStates)
public DataTable GetChanges(
DataRowState rowStates
)
public:
DataTable^ GetChanges(
DataRowState rowStates
)
public DataTable GetChanges(
DataRowState rowStates
)
public function GetChanges(
rowStates : DataRowState
) : DataTable
GetChanges 메서드는 원본의 변경 내용만 들어 있는 둘째 DataTable 개체를 생성하는 데 사용됩니다. rowStates 인수를 사용하여 새 개체에 포함될 변경 형식을 지정합니다.
관계 제약 조건을 사용하면 변경되지 않은 부모 행이 포함될 수도 있습니다.
Private Sub ProcessDeletes(table As DataTable, _
adapter As OleDbDataAdapter)
Dim changeTable As DataTable = table.GetChanges(DataRowState.Deleted)
' Check the DataTable for errors.
If table.HasErrors Then
' Insert code to resolve errors.
End If
' After fixing errors, update the database with the DataAdapter
adapter.Update(changeTable)
End Sub
private void ProcessDeletes(DataTable table,
OleDbDataAdapter adapter)
{
DataTable changeTable = table.GetChanges(DataRowState.Deleted);
// Check the DataTable for errors.
if (changeTable.HasErrors)
{
// Insert code to resolve errors.
}
// After fixing errors, update the database with the DataAdapter
adapter.Update(changeTable);
}
Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
.NET Framework
3.5, 3.0, 2.0, 1.1, 1.0에서 지원
.NET Compact Framework
3.5, 2.0에서 지원
XNA Framework
1.0에서 지원
참조
기타 리소스