-3
votes
0answers
16 views

Sql Query to return last value in special column in DataBase

How can I return last value in Id column for example and print it in MessageBox?
0
votes
4answers
39 views

Check username and password in java DataBase and give wrong password message if false

i want to display an error wrong username & password after comparing entered username and password with database of users in java. the problem is it does the if else statement against each row ...
0
votes
3answers
20 views

Additional queries in JPA

I have two classes InvitedPerson and Flight with a one to one relationship with each other. Here is how they are annotated. public class InvitedTech{ ... @OneToOne(mappedBy="invitedTech", ...
2
votes
1answer
22 views

Create java.sql.blob instance in java stored procedure

This is my first time posting a question in stackoverflow, I need to write a java stored procedure that creates an excel file and returns a blob containing the file data in bytes. My pl/sql function ...
-8
votes
2answers
45 views

how to conceive this model in database

i have to conceive the following model: i've patients and 4 specialities (dermatology, nutrition, Lazer, mesotherapy) so each patient can belong to one speciality and one speciality can have several ...
1
vote
1answer
16 views

Building ordered and limited delete request in jooq

I recently encountered the following problem with buiding queries in jooq (version 3.1.0): I want to build delete statement with order and limit constraints. So, my aim is to build something like ...
0
votes
1answer
23 views

NamedQuery with multiples entities and get multiples attributes

I'm works with JPA and I'm doing query SQL but I don't know how to convert to namedQuery this is the query with sql: SELECT DISTINCT o.descripcion, t.descripcion , ...
1
vote
1answer
48 views

Hibernate criteria returns empty result

I want to retrieve data from the database (Oracle) using Hibernate. I want to select all columns from a view. The view has no primary key, so I used composite key in the Hibernate-mapping. Firstly ...
0
votes
1answer
21 views

Update Statement - Syntax error in UPDATE statement (Java & MS Access)

I am trying to update a MS Access database. I have searched this and I have tried everything I have found but I am still getting the following error. java.sql.SQLException: [Microsoft][ODBC ...
0
votes
1answer
24 views

“super-dynamic” query with MyBatis

Is there way to create sql query on the fly with MyBatis? To concretize: I have a query, where part of it (but not parameter) needs to be created in the runtime: with dummy (id) as ( ...
0
votes
0answers
11 views

How to disable second-level cache invalidation on every native SQL query?

I store some entities that are not changed via Hibernate in Hibernate 2nd level cache. Also, I perform a lot of native SQL queries (updates) via Hibernate SessionFactory. Every time I execute native ...
1
vote
2answers
40 views

JOOQ & transactions

I've been reading about transactions & jooq but I struggle to see how to implement it in practice. Let's say I provide JOOQ with a custom ConnectionProvider which happens to use a connection pool ...
1
vote
3answers
44 views

How can I know a where-clause query results contains another where-clause query results?

How can I know a where-clause's query-results contains another where-clause's query-results? For example: "id>0" contains "id>1" "id>0 or name='China'" contains "id>1" "id>0 or ...
-2
votes
0answers
17 views

how pagination implementation should be for server+client side pagination? [on hold]

We have application connected to database with 5k+ records. We are displaying these records on jsp in our application. We need to implement pagination now.application first should get total records in ...
0
votes
0answers
19 views

Loading sql query template from XML file [on hold]

Is there any lightwegiht version of sql query loader that loads queries from xml file? FILE : sql.txt <queries> <query name="q1"> SELECT * FROM TBL1 WHERE A=3,B=5 ...
0
votes
1answer
35 views

Map two table to singe arraylist object using jdbc connection

I have two table i.e SALE and SALEPRODUCT(there is one to many relationship between both table(. SALE table contain detail of individual sale and SALEPRODUCT contain all the product detail related to ...
0
votes
1answer
30 views

hibernate joins not working

I am new in hibernate.i have 2 two tables one is job and other is jobSkills. but when i insert data into database using jsp form.all data is going properly but jobID is going null i know its simple ...
0
votes
1answer
32 views

Take data from global temporary table which has 'on commit delete rows' command

I have a sql function named TEST_FUNCTION which post data to a global temporary table named GLOBAL_TEMP when calling. When I call the function it returns string "SUCCESS" if data posted to GLOBAL_TEMP ...
0
votes
1answer
23 views

Need Advice connecting Java Application to Local SQL Database

I'm constructing some code where I have two applications one written in VB.net and another written in Java, both applications use a common SQL server hosted locally, I've looked all over the web and ...
0
votes
2answers
36 views

Is there a way I can extract table data from a SQL database without using the ResultSet class in Java?

I am programming a fairly simple database application in Java. The typical way of extracting data from a SQL database goes something like this: private Connection conn = null; private ...
0
votes
0answers
23 views

Android, take an entire row from postgreSQL database and put in a table or another structure

i'm new to Android programming but i made a little application that interacts with a postgreSQL database via JDBC e made things that aren't related to my question. My main question is: i have a table ...
0
votes
1answer
30 views

Can't connect to my local sql database in Java?

I have a local SQL express database, and I'm trying to insert items using java and read them in using asp.net, this is the working connection string I uses in my asp.net application: "Data ...
0
votes
2answers
38 views

Notify client about changes in database in java [on hold]

I've been searching around for the answer to this question, but haven't been able to find a solution. I am working on a distributed client-server system that uses TCP. The program's functions is to ...
0
votes
1answer
21 views

Derby out of memory

I am trying to load 100,000 records in the net beans database and end up getting this error: java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: ...
-3
votes
3answers
41 views

JDBC Select from Select ResultSet

this is my tables: table Paciente +------------------------------------+ | Nome | RG | ID_Paciente | +------------------------------------+ | Lucas | 10101 | 1 | ...
2
votes
0answers
29 views

SQL-Java Data type mapping

I would like to map the data types of Java and SQL, for example : SQL QUERY DATATYPE - JAVA DATATYPE VarCharValue - String FloatValue - double Hence, I would like to know more for Reference ...
-2
votes
0answers
22 views

sql in cart please do somthing [on hold]

enter code here `package ShoppingCart; import javax.swing.*; importjavax.swing.JOptionPane; enter code hereimport java.awt.; import java.awt.event.;import java.sql.; /** * @author Student ...
0
votes
1answer
24 views

delete MySQL dump files

My procedure is : first dump MySQL file then i am creating new file from this dump file then deleting dump file. I am trying to delete MySQL dump file by following java code ...
1
vote
1answer
27 views

ODBC MS Access: syntax error in FROM clause

Working with Access 2003 & Java 1.7.0._45 in Windows Vista When executing the following SQL query: String myQuery = SELECT Table1.name, Table2.name FROM Table1 JOIN Table2 ON Table1.code = ...
0
votes
1answer
27 views

MySQL syntax error with commas? - Java

I'm trying to insert some data in a DB but I'm having some troubles. Currently I can't add data to my table and I don't know why. I'm using some generic methods that you don't need to understand, ...
0
votes
1answer
17 views

Passing parameter to Java Method then using that parameter in SQL Query Statement

So the idea is that i can send an amount of bedrooms(int) as a parameter to a Java method which will use that int parameter in an SQL statement that returns all houses in the database with X amount of ...
0
votes
1answer
23 views

Hibernate + PostgreSQL + Network Address Type (inet, cdir)

I have started my example project with Hibernate 4.2.7 and PostgreSQL 9.3.1 and everything is going well. At the moment I would like to use INET PostgreSQL type but I am not able to map it with ...
0
votes
1answer
50 views

Display image on a JLabel from a blob column in Oracle database

How to display image on a JLabel from a blob column in oracle database? Hello I have been struggling for days now trying to figure out how I can display an image on a jLabel from a blob column in ...
0
votes
1answer
26 views

JDBC ODBC MS Access 2003 Update query does not update register

Using Ms Access 2003 on Windows Vista Java 1.7.0_45 & NetBeans IDE 7.4 I'm trying to run a simple UPDATE Query on a table named EMPLOYEES stmt.executeUpdate("UPDATE EMPLOYEES SET Name='John' ...
5
votes
5answers
76 views

How to insert and select from mysql simultaneously

I have a requirement where I need to insert mobile number in mysql if and only if the number is is not present.So for this I am first checking if a number is present in mysql using select query .If ...
-1
votes
3answers
51 views

Invalid Column name 'xxx'

I did 2 codes, following the oriented-object method. One of them is a DatabaseConnection code where you can find kind of querys, connection and disconnections from server. My DatabaseConnection class ...
0
votes
0answers
52 views

How should I go about implementing an inventory management system for a small business? [on hold]

I have thought of a few ways of going about this. I have a background in VBA for Excel and tried implementing such a system. Excel is very limited, however, so I turned to my background in Java. I ...
1
vote
0answers
21 views

SQL Server Collation to match Java case insensitive Unicode compare

I've been reading a lot about collations and have tried a few different things, but I can't seem to get the results I want. I'm looking for a collation that is case insensitive, accent insensitive, ...
0
votes
1answer
24 views

Having a Column name as Input Parameter of a PreparedStatement

I already used the search here (and other forums as well) but haven't found an answer exacty to what I'm trying to do. I know that it can easily be done in some other way, and this is just a small ...
0
votes
1answer
17 views

Teradata JDBC Create Volatile Table error 3585

I have never used the Teradata JDBC driver before, so I may be running into something very obvious... Basically, I am trying to create a volatile table from which I can query. Questions Maybe I ...
0
votes
1answer
38 views

Not being able to connect to MySql database

I've had more problems with my database in the past: It could not always get connection. The database runs on a website (webhosting), and I try to access it from my own PC. Here things go wrong, if I ...
1
vote
1answer
45 views

Several FileOutputStreams at a time?

The situation is that: I have a csv file with records (usually 10k but up to 1m records) I will process each record (very basic arithmetic with 5 basic select queries to the DB for every record) ...
0
votes
1answer
46 views

How to convert a Calendar into the DD-Mon-YY format and weird query results

I have an sql database which has dates in this format ex: 21-JAN-07 and I am creating a query in Java using the Calendar element, however I can't seem to find a function that convert to this format ...
2
votes
1answer
54 views

SQLite select, join and where clause problems

Im trying to populate a listview with data from 3 tables using join, and one table to check wether a user is part of a group. But im having trouble getting all the groups for a given user. Heres the ...
0
votes
2answers
28 views

Using Hibernate to CREATE SCHEMA in PostgreSQL

All i want is to execute the following SQL on my PostgreSQL server after my Hibernate SessionFactory has been initialized: CREATE SCHEMA IF NOT EXISTS "fooschema" AUTHORIZATION "foouser"; Currently ...
0
votes
0answers
26 views

What is the best way to fill a ListView with virtual data and database data?

I need to fill a ListView with Custom Categories (virtual), and Real Data from database. What is the best way to achieve this with minimal performance loss? The items may be thousand of them. I am ...
0
votes
1answer
35 views

Automatically trim string if it is too long on insert/update

I've got an application which gets data from the web and inserts it into a H2 DB. On rare occasions, the value being inserted is bigger then the SQL column size. In these cases I'd like to ...
0
votes
0answers
16 views

Tomcat webapp using Oracle. Exception SQLException: Locale not recognized thrown after aprox 2 hours of running correctly

we have a webapplication deployed in tomcat 7 using Oracle database. Everything works fine for around 2 hours, data are written/read into database. After this period of time we sudenly receive the ...
0
votes
0answers
24 views

JDBC 3.0 getParameterType call not supported

i am getting below exception when trying to insert my rows java.sql.SQLException: Parameter metadata not available for the given statement at ...
0
votes
3answers
49 views

JDBC PreparedStatement, how to select and insert?

I'm trying to execute stored procedure via JDBC, which has simple structure: ALTER PROCEDURE test AS BEGIN SELECT ... INSERT ... END The problem is that insert is not happened. When I execute this ...

15 30 50 per page