
06-05-2008, 10:21
|
|
|
|
חבר מתאריך: 27.04.08
הודעות: 9
|
|
|
מישהו יכול להגיד לי מה לא טוב פה?
Public Sub SaveData(ByVal DSet As DataSet)
Dim j As Integer
AdapterCommands()
For j = 0 To DSet.Tables.Count - 1
Try
_Adp.Update(DSet.Tables(j))
Catch ex As SqlException
MsgBox(ex.Message)
End Try
Next
End Sub
Private Sub AdapterCommands()
Dim ss As String = "select * from titles"
_CommandBuild = New SqlCommandBuilder(_Adp)
_Adp.SelectCommand = New SqlCommand(ss, _Con)
With _Adp
.UpdateCommand = _CommandBuild.GetUpdateCommand
.DeleteCommand = _CommandBuild.GetDeleteCommand
.InsertCommand = _CommandBuild.GetInsertCommand
End With
End Sub
|