Questions tagged [executequery]

Using Java's Statement executeQuery method for getting SQL select results

133 questions
2
votes
1 answer

ExecuteQuery command in SQLite x86 runs very slow

I'm facing a problem with SQLite and I need some help. I'm developing an application in C# .NET with SQLite precompiled dlls. The versions that I use is "1.0.66.0" for x86 and "1.0.79.0" for x64 processor. I use the following command to get some…
m.stef
  • 21
  • 2
2
votes
2 answers

grails gorm executeQuery HQL inner join

I am trying to do a simple inner join using GORM's executeQuery but getting a QuerySyntaxException.....I believe my hql is ok. Here is my query def query = Institution.executeQuery("select longName from Institution inner join…
2
votes
1 answer

Java - Stop executequery() after some period

I have an SQL query executed by: ResultSet resultSet = preparedStatement.executeQuery(); while( resultSet.next() ){ // do some stuff } Is there a way to stop the execution and do some code after let's say 2 minutes of execution? Thanks
daiquiri33
  • 65
  • 2
  • 7
2
votes
1 answer

Execute Query not updating records/data

I'm using the database utility Execute Query to experiment with Oracle SQL (10g). My problem is that even after successfully executing a CREATE TABLE and an INSERT, the records are not shown when opening the data inspector. Here is what I run: DROP…
Jawap
  • 2,463
  • 3
  • 28
  • 46
2
votes
4 answers

hibernate query - grails

I'm new in grails and I'm not really familiar in hibernate. I've come up to a problem regarding hibernate query using executeQuery in grails. I just made this code similar to the original code that's having a problem: def nonMemberList =…
antibry
  • 282
  • 5
  • 22
1
vote
1 answer

java.sql.SQLException

I am getting the following error: java.sql.SQLException: Exhausted Resultset at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at…
Ava
  • 5,783
  • 27
  • 58
  • 86
1
vote
0 answers

Grails/Hibernate - query associations

I am struggling with a Grails(Hibernate) query. I have a table (ExamLog) that tracks each time an exam question is modified in a test bank. The ExamLog table has the following attributes: logId(PK), exam(FK), question(FK), comments, oldMark,…
1
vote
2 answers

How to get a value from an executeUpdate OR update in java?

Im trying to get some returning data from an postgresql update. The "update" works well in the DB script, but in java I'm having some issues: the code stucks while executing the query. I'm trying with "PreparedStatament ps", "ResultSet…
J.Carlos
  • 27
  • 2
  • 6
1
vote
2 answers

JDBC executeQuery() returning both ResultSet and output params

I am calling one sp with few out params and as per my requirement,I need to use ResultSet on some condition and out params on other conditions. But using executeQuery(), I am getting, JZ0R0: ResultSet has already been closed error.(I am using Sybase…
icoder
  • 11
  • 1
  • 2
1
vote
1 answer

Using ExecuteQuery() with entity framework, entity class

I am trying to jump from ASP Classic to asp.net. I have followed tutorials to get Entity Framework and LINQ to connect to my test database, but I am having difficulties figuring out ExecuteQuery(). I believe the problem is that I need an "entity…
sfreelander
  • 161
  • 1
  • 2
  • 11
1
vote
1 answer

Grails 2.4.4 executeQuery() to join tables from a table of a database

this is the code for my domains. class Btr { Date dateBreak int timeBreak String typeBreak User usuario static constraints = { } static mapping = { } } class User { String name String user String…
Melany
  • 71
  • 5
1
vote
1 answer

U-SQL Query data source

I would like to write query to remote Azure SQL database. I followed the tutorial via Query Data Source - Method 1 I was successful to run the query from tutorial: @results1 = SELECT * FROM EXTERNAL MyAzureSQLDBDataSource EXECUTE @"SELECT…
peterko
  • 503
  • 1
  • 6
  • 18
1
vote
1 answer

SQL LINQ executequery is work slow. How can i improve performance?

select top 10 productName from Products where productDetails like '%something%' group by productName order by productName asc What should i do/change on my query to improve performance?
Adem Büyük
  • 563
  • 7
  • 15
1
vote
1 answer

How to executequery while reading data from another sql query in c#?

I want to ExecuteQuery() while reading data from another resultset of ExecuteQuery. SqlCommand cmd1 = new SqlCommand("pgwp_teamtypeselect", con); cmd1.CommandType = CommandType.StoredProcedure; rdr = cmd1.ExecuteReader(); string ehtml =…
1
vote
1 answer

executeQuery() - return resultset

I am getting this error in return resultset. cannot convert results from Resultset to double. Isn't it possible to return a double? What should i do? public double getBalance( String name ) { ResultSet resultSet = null; try { …
MDK
  • 95
  • 1
  • 1
  • 8
1 2
3
8 9