Questions tagged [executequery]

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

133 questions
0
votes
1 answer

Why Connection doesn't have executeQuery method

Why executeQuery() method isn't available in Connection Class? If it was available we can easily call executeQuery method using Connection Object. So can't we extend the Statement Class to Connection Class to achieve this?
Varuna Lakshan
  • 37
  • 1
  • 10
0
votes
0 answers

Java Write queries into a txt upon every getStatement().executeQuery() call

My problem is that I would like to write all the queries called in my app into a log file. For example: here's a query: String query = "SELECT * FROM users WHERE name LIKE 'Mike'"; I also have a Connection (DBConnect) object, with which I execute…
mordes
  • 73
  • 1
  • 1
  • 9
0
votes
0 answers

How to reject DML and DDL queries?

I agree that the database user privileges should be tuned to prevent him for running DML or DDL queries but I'm trying to do a similar thing from the client side. The JDBC side. I downloaded Oracle driver found here. While the driver and it's…
Muhammad Gelbana
  • 3,890
  • 3
  • 43
  • 81
0
votes
1 answer

GORM: null check on new property leads to QueryException

I've added a new property uuid into the GORM mapping of the formerly existing domain class BComponent: static mapping = { tablePerHierarchy false id column:'bc_id' uuid column:'bc_uuid', type:'text' name column:'bc_name', type:'text',…
philburns
  • 310
  • 4
  • 18
0
votes
0 answers

execute SQL query that include Temp table that DROP and Create Temp and then SELECT

I'm trying to execute the following query: DROP TABLE IF EXISTS TEMP_TBL_NAME; USE `DB_NAME`; CREATE TEMPORARY TABLE IF NOT EXISTS TEMP_TBL_NAME AS ( SELECT `FIELD_1`, `FIELD_2` FROM `TBL_NAME` WHERE `FIELD_1` = ? AND `FIELD_2` =…
Shai Epstein
  • 179
  • 1
  • 3
0
votes
2 answers

statement.executeQuery() mystery. Code not being executed, nor exception is being caught.

Providing the code and the output. Searched the internet but didn't find solution. Everything compiles and runs okay, up until "//PROBLEMATIC LINE", where execution goes directly to "//HERE" without any indication, exception or error. I have used…
Maral Kay
  • 47
  • 10
0
votes
1 answer

Using Dynamic SQL for Column Headers in SSRS Report Builder Execute(@Query) - Use Values From 1 Table as Col Headers for Values From A Different Table

I am using Microsoft SQL Server Report Builder 3.0 on SQL Server Reporting Services 2012. I have a stored procedure that uses dynamic SQL. It works great when executing it in SQL, but when I use this as a data set in Report Builder, it doesn't…
0
votes
2 answers

Get specify value from Query in WebForms

I have a problem to get specify value from my query. I receive one row for my GridView but when i try to read that one value to get it into some variable it said me that there is no any value. else if (Request.QueryString.AllKeys.Contains("a")) { …
Adriano
  • 874
  • 2
  • 11
  • 37
0
votes
3 answers

While Loop Terminating after ResultSet.execute

I am trying to make TABLE COMPB equivalent to TABLE COMPA by Update and Delete operations on Table COMPB based on Table COMPA. The code works perfectly fine while generating proper SQL. Problem is, the moment I put execute statement as below, while…
Hari Prasad
  • 1,751
  • 2
  • 15
  • 20
0
votes
2 answers

JDBC - SQLITE Select to variable

I am trying to run a query / select statement and save it in a variable. I know how to get something specific from a specific column but not from counting rows. This is working as I getting MYID specifically. ResultSet MYIDrs = stmtCFG.executeQuery(…
user3025039
0
votes
2 answers

C# ExecuteQuery: How to use IN operator?

I searched this problem but i think anyone has faced it. I am trying to use IN operation with ExecuteQuery. IEnumerable results = db.ExecuteQuery ("SELECT * FROM TAssets " + " WHERE AssetId not in (select MatchedAssetId from…
akdora
  • 893
  • 1
  • 9
  • 19
0
votes
0 answers

Flaw on VBA Variable Execution

Good Afternoon StackOverflow gang, I'm currently in the process of fully automating my VBA script, however I've hit a slight bump. The following portion of my script take the date in a specific cell, and translates it farther down the script. The…
E. Weglarz
  • 37
  • 1
  • 7
0
votes
1 answer

Save in a variable and multiply double value query result C#/MySql

I'm trying to save the unique value resulting from a query into a double variable, since the same is stored in the database as double, so I can later be able to multiply it with a counter, with the following code: public partial class…
Ghaamae
  • 71
  • 1
  • 10
0
votes
2 answers

executing a reference to field.onchange in Firefox

I have HTML code which calls a javascript function from a form, using:
user431329
  • 11
  • 1
  • 4
0
votes
2 answers

How to filter by date and do a Form's query by code?

I have to do a Form query by code. The datasource table is CustomVendTable(is a custom table). I open a form and in my init method I get the table caller : public void init () { VendTable = myVendTableCaller; myVendTableCaller =…
ulisses
  • 1,549
  • 3
  • 37
  • 85
1 2 3
8 9