Click here to Skip to main content
15,908,842 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRe: index out of range exception Pin
zaimah19-Mar-09 0:40
zaimah19-Mar-09 0:40 
AnswerRe: index out of range exception Pin
Steven J Jowett18-Mar-09 23:58
Steven J Jowett18-Mar-09 23:58 
GeneralRe: index out of range exception Pin
zaimah19-Mar-09 0:43
zaimah19-Mar-09 0:43 
Questionkill process [modified] Pin
hrishiS18-Mar-09 20:27
hrishiS18-Mar-09 20:27 
AnswerRe: kill process Pin
_Damian S_18-Mar-09 20:32
professional_Damian S_18-Mar-09 20:32 
GeneralRe: kill process Pin
hrishiS18-Mar-09 20:46
hrishiS18-Mar-09 20:46 
GeneralRe: kill process Pin
Christian Graus18-Mar-09 20:57
protectorChristian Graus18-Mar-09 20:57 
GeneralRe: kill process Pin
hrishiS18-Mar-09 23:48
hrishiS18-Mar-09 23:48 
GeneralRe: kill process Pin
Christian Graus18-Mar-09 23:53
protectorChristian Graus18-Mar-09 23:53 
GeneralRe: kill process Pin
hrishiS19-Mar-09 0:05
hrishiS19-Mar-09 0:05 
GeneralRe: kill process Pin
Christian Graus19-Mar-09 0:19
protectorChristian Graus19-Mar-09 0:19 
GeneralRe: kill process Pin
hrishiS19-Mar-09 0:48
hrishiS19-Mar-09 0:48 
GeneralRe: kill process Pin
Yusuf19-Mar-09 4:22
Yusuf19-Mar-09 4:22 
GeneralRe: kill process Pin
Yusuf19-Mar-09 0:21
Yusuf19-Mar-09 0:21 
GeneralRe: kill process Pin
hrishiS19-Mar-09 0:50
hrishiS19-Mar-09 0:50 
GeneralRe: kill process Pin
Eytukan19-Mar-09 0:21
Eytukan19-Mar-09 0:21 
GeneralRe: kill process Pin
hrishiS19-Mar-09 0:44
hrishiS19-Mar-09 0:44 
GeneralRe: kill process Pin
Dave Kreskowiak19-Mar-09 2:29
mveDave Kreskowiak19-Mar-09 2:29 
Questiondrawing line Pin
dkosasih18-Mar-09 19:09
dkosasih18-Mar-09 19:09 
AnswerRe: drawing line Pin
dan!sh 18-Mar-09 19:22
professional dan!sh 18-Mar-09 19:22 
AnswerRe: drawing line Pin
Christian Graus18-Mar-09 20:07
protectorChristian Graus18-Mar-09 20:07 
QuestionCannot update or delete access database Pin
hendrikbez18-Mar-09 19:09
hendrikbez18-Mar-09 19:09 
I am trying to update and delete ,but get this error code now, it did work before.

error code == "There is no row at position -1"

My update code

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click

       Dim cb As New OleDb.OleDbCommandBuilder(da)

       ds.Tables("Blokkies").Rows(inc).Item(1) = TxtLuidraad.Text
       ds.Tables("Blokkies").Rows(inc).Item(2) = txtA1.Text
       ds.Tables("Blokkies").Rows(inc).Item(3) = txtA2.Text
       ds.Tables("Blokkies").Rows(inc).Item(4) = txtA3.Text
       ds.Tables("Blokkies").Rows(inc).Item(5) = txtA4.Text
       ds.Tables("Blokkies").Rows(inc).Item(6) = txtA5.Text
       ds.Tables("Blokkies").Rows(inc).Item(7) = txtA6.Text
       ds.Tables("Blokkies").Rows(inc).Item(8) = txtA7.Text
       ds.Tables("Blokkies").Rows(inc).Item(9) = txtA8.Text
       ds.Tables("Blokkies").Rows(inc).Item(10) = txtA9.Text
       ds.Tables("Blokkies").Rows(inc).Item(11) = txtA10.Text
       ds.Tables("Blokkies").Rows(inc).Item(12) = txtA10.Text
       ds.Tables("Blokkies").Rows(inc).Item(13) = txtA10.Text

       da.Update(ds, "Blokkies")

       MsgBox("Register verander")

   End Sub



I did try to use this, but still get same error

If Not IsDBNull(ds.Tables("Blokkies").Rows(inc).Item("luidraad")) Then
            ds.Tables("Blokkies").Rows(inc).Item(1) = TxtLuidraad.Text
        End If


My delete code

Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click

       If MessageBox.Show("Is jy seker jy wil die register verwyder?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then

           MsgBox("Register is nie verwyder nie")
           Exit Sub

       End If

       Dim cb As New OleDb.OleDbCommandBuilder(da)

       ds.Tables("Blokkies").Rows(inc).Delete()
       maxrows = maxrows - 1

       inc = 0
       NavigateRecords()
       da.Update(ds, "Blokkies")

   End Sub

AnswerRe: Cannot update or delete access database Pin
dan!sh 18-Mar-09 19:25
professional dan!sh 18-Mar-09 19:25 
GeneralRe: Cannot update or delete access database Pin
hendrikbez18-Mar-09 19:31
hendrikbez18-Mar-09 19:31 
GeneralRe: Cannot update or delete access database Pin
dan!sh 18-Mar-09 19:32
professional dan!sh 18-Mar-09 19:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.