G
Guest
I have created in VB some SQL statements in a for next loop.
After approx. 120 for/next loops, Access is not creating the correct result
anymore. There is a counter inside the for/next loop, but the counter is not
correct anymore after 120 (or sometimes more) loops.
Can it be that it is not possible to set a lot of SQL statements one after
the other? Must there be some brake?
See a part of the VB:
I am creating a XML statement with some variables..
For TELLER = 1 To H_TELLER
'Scherm 1
If TELLER = 1 Then
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""<screen name=""+'""'+""Screen""+""" & SCREEN1 &
"""+'"" entryscreen=""true"" exitscreen=""false"" transient=""false"">' AS
omschrijving;"
Else
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""<screen name=""+'""'+""Screen""+""" & SCREEN1 &
"""+'"" entryscreen=""false"" exitscreen=""false"" transient=""false"">' AS
omschrijving;"
End If
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )"
& _
" SELECT ""<description>"" AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT "" <oia status=""+'""NOTINHIBITED"" optional=""false""
invertmatch=""false"" />' AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""</description>"" AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""<actions>"" AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""<input value=""+'""21[enter]"" row=""0""
col=""0"" movecursor=""true"" xlatehostkeys=""true"" encrypted=""false"" />'
AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""</actions>"" AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""<nextscreens timeout=""+'""0"" >' AS omschrijving;"
SCREEN1 = SCREEN1 + 1
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""<nextscreen name=""+'""'+""Screen""+""" & SCREEN1 &
"""+'"" />' AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""</nextscreens>"" AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""</screen>"" AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT "" "" AS omschrijving;"
next
After approx. 120 for/next loops, Access is not creating the correct result
anymore. There is a counter inside the for/next loop, but the counter is not
correct anymore after 120 (or sometimes more) loops.
Can it be that it is not possible to set a lot of SQL statements one after
the other? Must there be some brake?
See a part of the VB:
I am creating a XML statement with some variables..
For TELLER = 1 To H_TELLER
'Scherm 1
If TELLER = 1 Then
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""<screen name=""+'""'+""Screen""+""" & SCREEN1 &
"""+'"" entryscreen=""true"" exitscreen=""false"" transient=""false"">' AS
omschrijving;"
Else
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""<screen name=""+'""'+""Screen""+""" & SCREEN1 &
"""+'"" entryscreen=""false"" exitscreen=""false"" transient=""false"">' AS
omschrijving;"
End If
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )"
& _
" SELECT ""<description>"" AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT "" <oia status=""+'""NOTINHIBITED"" optional=""false""
invertmatch=""false"" />' AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""</description>"" AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""<actions>"" AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""<input value=""+'""21[enter]"" row=""0""
col=""0"" movecursor=""true"" xlatehostkeys=""true"" encrypted=""false"" />'
AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""</actions>"" AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""<nextscreens timeout=""+'""0"" >' AS omschrijving;"
SCREEN1 = SCREEN1 + 1
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""<nextscreen name=""+'""'+""Screen""+""" & SCREEN1 &
"""+'"" />' AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""</nextscreens>"" AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT ""</screen>"" AS omschrijving;"
DoCmd.RunSQL "INSERT INTO tabel_resultaat ( omschrijving )" & _
" SELECT "" "" AS omschrijving;"
next