Using Java's Statement executeQuery method for getting SQL select results
Questions tagged [executequery]
133 questions
1
vote
2 answers
Telling Java Servlet to "executeQuery" every 5seconds
Is it possible to execute a query in my java servlet every 5 seconds? As i need the data values inside my database to update my bar graph in my website every few seconds.
ResultSet rset = stmt.executeQuery(sqlStr);

Zainau
- 95
- 4
- 13
1
vote
0 answers
Java - How to read multiple DataRow
I´m new to Java programming, and I am migrating an application from C # to Java EE. The problem is this, I run a query through a stored procedure that returns the paginated result, for example, imagine that I search for the name John in the…

Marcos Cruz
- 93
- 1
- 2
- 11
1
vote
5 answers
Select prefixed columns from multiple tables in Java with MySQL
I have to deal with Java to create a restful API and I'm using it with MySQL to query the DB.
I'm quite new to Java and this might be a very basic question, but used to PHP frameworks where this problem doesn't exist and I was wondering what's the…

Alvaro
- 40,778
- 30
- 164
- 336
1
vote
4 answers
how to convert row value from sql server to string in c#
I have a method like this
private string AccountCreation()
{
string accountId="";
using (SqlConnection connection = new SqlConnection(ConnectionString))
{
connection.Open();
SqlCommand command = new SqlCommand();
…

sindhu jampani
- 504
- 3
- 10
- 30
1
vote
1 answer
Xamarin PCL and sqlite.net
I would have the need, in a pcl Xamarin, to pass to a function a type, which is then used to perform a query.
The code that I tried to use is this:
public object sqlLeggi(string sql, Type myType){
SQLiteCommand cmd = DB.CreateCommand(sql);
var…

user3452979
- 13
- 3
1
vote
2 answers
Conversion failed when converting date - linq2sql ExecuteQuery
Here is my code piece:
#region Validate and prepare parameters
if (month > 12)
{
throw new ArgumentException("Value of 'month' could not be greater than 12.");
}
int yearEnd = year;
int…

xkcd
- 2,538
- 11
- 59
- 96
1
vote
1 answer
retrieve parameter from executeQueryAsync, javascript
I'm trying to retrieve a parameter from a success method that is called within and executeQueryAsync using Javascript ECMA scripting.
I get tried follwing the suggestion…

mogoli
- 2,153
- 6
- 26
- 41
1
vote
2 answers
Asynchronous data loading in Entity-Framework?
Did anyone hear about asynchronous executing of an EF query?
I want my items control to be filled right when the form loads and the user should be able to view the list while the rest of the items are still being loaded.
Maybe by auto-splitting the…

Shimmy Weitzhandler
- 101,809
- 122
- 424
- 632
1
vote
3 answers
NullPointerException when run executeQuery(sql)
I have simple query in Java to run in SQL SERVER 2008. When it reaches to
rs = stmt.executeQuery(sql); it gives me java.lang.NullPointerException
1-I use jtds driver to connect my code to database.
2-When I execute the query directly in database it…

Sal-laS
- 11,016
- 25
- 99
- 169
1
vote
1 answer
linq2sql: using ExceuteQuery when rows returned are not in my dto? Can i use a generic data type?
been using ExecuteQuery with some success, i.e. where AccessRights is my dto and queryString contains "Exec sp_name param1,param2 etc"
var accessRights =
this.db.ExecuteQuery(queryString,…

mark smith
- 20,637
- 47
- 135
- 187
1
vote
2 answers
Linq to sql table dynamically with ExecuteQuery VB
I am using VB Framework 4.0 and Linq to sql.
I want to choose dynamycally the name of table. I have used the library namedtable.dll and I have mapped all the tables of database and it's Ok.
My problem is when I try to execute executequery. Here my…

user1253414
- 249
- 1
- 8
- 17
1
vote
2 answers
ExecuteQuery: Java out of Heap Space
I am using ExecuteQuery (www.executequery.org) to connect to a remote Oracle DB. I have received an .sql-file that I'm supposed to run on this DB. But I cannot even load this file into ExecuteQuery, because apparently it's too big: I get a Java…

kafman
- 2,862
- 1
- 29
- 51
1
vote
2 answers
JDBC incorrect syntax near "." from executeQuery
Ok, I have no hair left. When passing a constant string to executeQuery there's no problem. When passing a String object it fails and the exception is ' incorrect syntax near "."'.
Everything is essentially exactly the same, but for some reason one…

another-cranky-old-guy
- 114
- 2
- 9
1
vote
1 answer
Java MYSQL Exception in executeQuery()
I get a Java MySQL exception
@Override
public ResultSet executeQuery (String query, ArrayList arguments) throws SQLException
{
final PreparedStatement pstmt = getPstmt(query, arguments);
final ResultSet retrievedData =…

Gapchoos
- 1,422
- 5
- 20
- 40
0
votes
2 answers
MVC ExecuteQuery not a valid method on Context object
I am trying to execute a sql command directly against the database. However, intellisense does not see ExecuteQuery as a valid method against my context variable. I am sure I am missing something obvious.
My context class:
public class…

Gene Stempel
- 11
- 4