W
wneumann
Hi all,
in a java-application i've got the following problem:
In a JPanel with several JTextFields i start a sql-query to a address
table. This query will be started
on the CaretUpdate-Event, because i want to get the result when ever i
change the field-contents.
This query runs on 8 fields in a very good performance (e.g. on name,
city,street,phonenumber ...), but if
i change the entry for the areacode the performance is really terrible
(about 20 sec) and after 4 or 5 queries
i get the java.lang.OutOfMemoryError!!??
The resultset contains as max. 7000 records, but i think that's not the
problem, because if i ask for
all addresses in the 'name-field' there are no problems.
Do you have any idea what's wrong ??
On the CaretChangedEvent the following code will be started:
private void getAddress(){
....
String command = "SELECT FIELDLIST FROM ADDRESS WHERE NAME LIKE
'W%' ORDER BY NAME" // that works!!
String command = "SELECT FIELDLIST FROM ADDRESS WHERE AEREACODE
LIKE '04%' ORDER BY NAME" // that do'nt work!!
}
The evironment :
Java 1.4.0.13
OS Windows 2000
SQL mySQL 4.0.13 nt
th.i.a
Wolfgang
in a java-application i've got the following problem:
In a JPanel with several JTextFields i start a sql-query to a address
table. This query will be started
on the CaretUpdate-Event, because i want to get the result when ever i
change the field-contents.
This query runs on 8 fields in a very good performance (e.g. on name,
city,street,phonenumber ...), but if
i change the entry for the areacode the performance is really terrible
(about 20 sec) and after 4 or 5 queries
i get the java.lang.OutOfMemoryError!!??
The resultset contains as max. 7000 records, but i think that's not the
problem, because if i ask for
all addresses in the 'name-field' there are no problems.
Do you have any idea what's wrong ??
On the CaretChangedEvent the following code will be started:
private void getAddress(){
....
String command = "SELECT FIELDLIST FROM ADDRESS WHERE NAME LIKE
'W%' ORDER BY NAME" // that works!!
String command = "SELECT FIELDLIST FROM ADDRESS WHERE AEREACODE
LIKE '04%' ORDER BY NAME" // that do'nt work!!
}
The evironment :
Java 1.4.0.13
OS Windows 2000
SQL mySQL 4.0.13 nt
th.i.a
Wolfgang