Hello again.
I have a database with four tables with timer which Tick every 300 and Read Data to TextBox.
After few minutes I have error (Cursor window allocation of 2048 kb failed)
Sub call_Tick
Dim txt As String
txt= "SELECT barcode, name, surname, address FROM TABLE1 WHERE barcode = '" & barcode.text & "'"
cursor1 = SQL1.ExecQuery(txt)
If cursor1.RowCount>0 Then
cursor1.Position=0
barcode.text=cursor1.GetString("barcode")
name.text=cursor1.getString("name")
surname.text=cursor1.GetString("surname")
address.Text=cursor1.GetString("address")
Else
txt= "SELECT barcode, name, surname, address FROM TABLE2 WHERE barcode = '" & barcode.text & "'"
cursor1 = SQL1.ExecQuery(txt)
If cursor1.RowCount>0 Then
cursor1.Position=0
barcode.text=cursor1.GetString("barcode")
name.text=cursor1.getString("name")
surname.text=cursor1.GetString("surname")
address.Text=cursor1.GetString("address")
Else
txt= "SELECT barcode, name, surname, address FROM TABLE3 WHERE barcode = '" & barcode.text & "'"
cursor1 = SQL1.ExecQuery(txt)
If cursor1.RowCount>0 Then
cursor1.Position=0
barcode.text=cursor1.GetString("barcode")
name.text=cursor1.getString("name")
surname.text=cursor1.GetString("surname")
address.Text=cursor1.GetString("address")
Else
txt= "SELECT barcode, name, surname, address FROM TABLE4 WHERE barcode = '" & barcode.text & "'"
cursor1 = SQL1.ExecQuery(txt)
If cursor1.RowCount>0 Then
cursor1.Position=0
barcode.text=cursor1.GetString("barcode")
name.text=cursor1.getString("name")
surname.text=cursor1.GetString("surname")
address.Text=cursor1.GetString("address")
End If
End If
End If
End If
End Sub
Is that good method, or not?
Thanks!
I have a database with four tables with timer which Tick every 300 and Read Data to TextBox.
After few minutes I have error (Cursor window allocation of 2048 kb failed)
Sub call_Tick
Dim txt As String
txt= "SELECT barcode, name, surname, address FROM TABLE1 WHERE barcode = '" & barcode.text & "'"
cursor1 = SQL1.ExecQuery(txt)
If cursor1.RowCount>0 Then
cursor1.Position=0
barcode.text=cursor1.GetString("barcode")
name.text=cursor1.getString("name")
surname.text=cursor1.GetString("surname")
address.Text=cursor1.GetString("address")
Else
txt= "SELECT barcode, name, surname, address FROM TABLE2 WHERE barcode = '" & barcode.text & "'"
cursor1 = SQL1.ExecQuery(txt)
If cursor1.RowCount>0 Then
cursor1.Position=0
barcode.text=cursor1.GetString("barcode")
name.text=cursor1.getString("name")
surname.text=cursor1.GetString("surname")
address.Text=cursor1.GetString("address")
Else
txt= "SELECT barcode, name, surname, address FROM TABLE3 WHERE barcode = '" & barcode.text & "'"
cursor1 = SQL1.ExecQuery(txt)
If cursor1.RowCount>0 Then
cursor1.Position=0
barcode.text=cursor1.GetString("barcode")
name.text=cursor1.getString("name")
surname.text=cursor1.GetString("surname")
address.Text=cursor1.GetString("address")
Else
txt= "SELECT barcode, name, surname, address FROM TABLE4 WHERE barcode = '" & barcode.text & "'"
cursor1 = SQL1.ExecQuery(txt)
If cursor1.RowCount>0 Then
cursor1.Position=0
barcode.text=cursor1.GetString("barcode")
name.text=cursor1.getString("name")
surname.text=cursor1.GetString("surname")
address.Text=cursor1.GetString("address")
End If
End If
End If
End If
End Sub
Is that good method, or not?
Thanks!
Last edited: