Обсуждение: Problem with Running Query
Hi,
I have modified my postgres code to accept queries starting with a word "My" followed by the query followed by the 1000 #separated values,
inside postgres, i check for the word "My" at the beginning of the query if found, i will generate 1000 inserts into a table (these 1000 values are those i have sent after the query with the delimiter #), then execute the query which is in between "My" and #values,
Example: My query would look like this
My select * from xyz1 a, xyz2 b where a.a1=b.a1 #1#2#3...........
Now my problem is when i try to send the new (appended) query to the JDBC, i get
ArrayIndexOutOfBoundException: Index: 1 Size: 1
from the executeQuery function, here my query is reaching the postgres and is executing, but i am getting the exception in my JAVA Program
Any Idea of why i am getting the exception.
With Regards,
Bellur Ashwin
I have modified my postgres code to accept queries starting with a word "My" followed by the query followed by the 1000 #separated values,
inside postgres, i check for the word "My" at the beginning of the query if found, i will generate 1000 inserts into a table (these 1000 values are those i have sent after the query with the delimiter #), then execute the query which is in between "My" and #values,
Example: My query would look like this
My select * from xyz1 a, xyz2 b where a.a1=b.a1 #1#2#3...........
Now my problem is when i try to send the new (appended) query to the JDBC, i get
ArrayIndexOutOfBoundException: Index: 1 Size: 1
from the executeQuery function, here my query is reaching the postgres and is executing, but i am getting the exception in my JAVA Program
Any Idea of why i am getting the exception.
With Regards,
Bellur Ashwin
Here’s a new way to find what you're looking for - Yahoo! Answers
On Fri, 6 Apr 2007, Bellur Ashwin wrote: > I have modified my postgres code to accept queries starting with a word > "My" followed by the query followed by the 1000 #separated values, > inside postgres, i check for the word "My" at the beginning of the query > if found, i will generate 1000 inserts into a table (these 1000 values > are those i have sent after the query with the delimiter #), then > execute the query which is in between "My" and #values, > > Example: My query would look like this > > My select * from xyz1 a, xyz2 b where a.a1=b.a1 #1#2#3........... > > Now my problem is when i try to send the new (appended) query to the > JDBC, i get ArrayIndexOutOfBoundException: Index: 1 Size: 1 from the > executeQuery function, here my query is reaching the postgres and is > executing, but i am getting the exception in my JAVA Program > It certainly seems like an odd and non-standard thing to do so the JDBC driver could easily get confused if you are returning many command completion tags from a single query. A complete stacktrace and driver version would be more useful than this vague error description. Kris Jurka