problem with composite id

284 byte By pandev84a at 2007-11-27 7:00:29
hello frnds,i hava an table with four primary key.i want to fetch records which are composited with these four keys.so any one has idea that how to use hibernate for composite id then pls help me.....thanx in advance,,,regards Pandev84

Problem in JComboBox selected Index change

326 byte By Sana_Boya at 2007-11-27 7:01:09
hi allCan anyone send me the code for Loading values to JComboBox & then i want to Display Particular value for that Loaded value in JTextField.Ex:I loaded category cade for JComboBox & when JComboBox selected index change the particular category name should appear in ...

Parsing jdbc error message

552 byte By amishera2006a at 2007-11-27 7:02:05
Hi,I have this problem. I need to parse jdbc error message likeora-xxxx value to large for column "%s"."%s"."%s" (actual %d, maximum %d)I need to get the error information in the template eg "%s". so that I can print the name of the column for which the input is large to the user. Also what is ...

Configuring Database connection at runtime

472 byte By bhomiapankaja at 2007-11-27 7:02:06
Hi,I am new to JDBC and urgently needs ur help.What I want is to provide the URL (Connection String and DB info) in a config file and read that in the code. Also I should be able to change the DB location and connection string at runtime so that the next time the code executes, it takes the new ...

please help in JDBC with postgresql

404 byte By divinea at 2007-11-27 7:02:21
HiI am trying to connect java to postgresql. my code is working fine on RHEl4 but there isproblem on Fedora core 4. i am not able to understand what could be the reason. All my settings are same as i did on linux. The exception came isjava.net.SocketException: Invalid argument or cannot assign ...

PreparedStatement, Oracle and getting generated keys

2018 byte By LG_01a at 2007-11-27 7:03:02
Given the method below (which will insert a new row and return the auto generated row number for that row and works fine for MySQL and DB2): public static int autoIncInsertImpl(PreparedStatement pstmt, String autoIncCol)throws SQLException{int retVal = -1;ResultSet rs = ...

Newbie question - getMax?

796 byte By speedyvespaa at 2007-11-27 7:05:42
Hi, I'm a totally green, absolute beginner etc etc JDBC developer.I have two java programs - the first queries a table with a straightforward select statement, and the second one gets the Max value of a field from a table. Both work wonderfully.Question is, I need to use the Max value in the ...

mysql

297 byte By Hiaburia at 2007-11-27 7:06:25
I have been trying to make a java program read from my mysql database, but i am stuck on the part were it loads the drivers, any help?Also, is there a way to encrypt my username and password for my database so that if some one decompiles my code they cannot see my real name or

Is there JDBC stream compression wrapper available?

288 byte By carfielda at 2007-11-27 7:07:02
Is there generic JDBC stream compression wrapper ? Like I running a daemon at DB server side, which work as a proxy to actual DB, and there we connect to that proxy using a proxy JDBC driver.There data transfer in actual network is compressed, is there such thing available?

problem connecting to oracle database

4641 byte By lance_dragonsa at 2007-11-27 7:08:37
I'm having a really basic problem with connecting to oracle.I've made sure that the driver is being found by the program, but it always errors when trying to connect.CLASSPATH=C:\oracle\product\10.2.0\db_1\jdbc\lib;C:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar;C:\Program ...

Checking when a row was last modified

123 byte By rmgunduza at 2007-11-27 7:08:51
I want to get rows insert and last update time, without using user-defined colons. how can i do?Thanks

Urgent - pls help - Problem while inserting binary file into Oracle DB

1981 byte By smrsrajaa at 2007-11-27 7:08:53
Hi,I am trying to insert binary files into a Blob column in a Oracle 10G table.The binary files would be uploaded by the web users and hence come as multipart request. I use apache commons upload streaming API to handle it. Finally i am getting a input stream of the uploaded file.The JDBC code ...

save ireport to pdf

1710 byte By greenockboya at 2007-11-27 7:09:22
Apologies if this isn't the appropriate forum for this topic.I have created a simple report using ireport and it runs fine within ireport.However when I attempt to create a pdf file from the .jasper file then I don't appear to get any data. The pdf file is indeed created but it displays only ...

Validating a user based on result.next()

877 byte By sunish_josea at 2007-11-27 7:09:38
I have a user id in my database and I want to validate that user id from another program. So is it good enough to validate that user id based on my resultSet.next() with an appropriate queryfor examplepublic boolean validateUser(String userLogon) {-PreaparedStatement ps = ...

Hospital database design

702 byte By renjua at 2007-11-27 7:09:41
HiI am a final year BE student.For my project I choose hospital automation system.But the database design I submitted was thrown by my tutor.Can any one please help me to get a good database design for hospital management System. please... it is usrgent The requirement given wereManage ...

How to import data from Postgresql to Microsoft Excel using Java

225 byte By guguBananaa at 2007-11-27 7:10:14
Hello everyone!Can anyone in this forum suggest me how to import data from Postgresql database tables to Microsoft Excel format using Java.Any other alternative and easy ideas are a welcome.Cheers!

ORA-00020: maximum number of processes (1000) exceeded ..Urgent

720 byte By newwavea at 2007-11-27 7:11:34
Hi ,i have developed one webaplication in tomcat 5.5 which uses 15,000 employees.problem is in some peek times database is giving exception ORA-00020: maximum number of processes (1000) exceeded .once i restarted my tomcat every thing is working fine...i used connection polling in my ...

No suitable driver found for jdbc:oracle:oci:@

929 byte By samidurrania at 2007-11-27 7:29:00
Hello, I am able to compile my java program and run it. But =if I create an executable jarand try to run it I get an error - No suitable driver found for jdbc:oracle:oci:@.The classpath = .;C:\oracle\ora92\jdbc\lib\ojdbc14.jar;;C:\oracle\ora92\jdbc\lib\ojdbc14.jar;C:\Program ...

Unable to called out a trigger properly via my java program

1457 byte By peachteaa at 2007-11-27 7:29:11
hi alli got this error msg "java.sql.SQLException: ORA-06550: line 1, column 7. PLS-00221: 'PARTIAL_FILLED_TRIGGER' is not a procedure or is undefined." Pls help~! btw i've written a trigger and not a procedure with the java program. I've written in the 1st line of the trigger as"CREATE OR ...

[ORA-00922: missing or invalid option] preparedStatement.executeUpdate err

3006 byte By workformeandyoua at 2007-11-27 7:30:00
i am trying to create and populate an "Bookstore" table by concatenating query strings into one long string: myUpdateString. for some reason i keep getting the above runtime err message.the update string works if i break it down and use statment.execute("...");but i want to let SQL handle ...

Convert applet to jpg

282 byte By AmolPawara at 2007-11-27 7:30:54
Hi friends,I have builded application using struts. I upload .xls file in MySql database and then display all data on applet in barchart format. Now i want to save this chart present on applet as image (prefferabley .jpg format) so that i can mail it as an attachment.

Convert applet to jpg

282 byte By AmolPawara at 2007-11-27 7:30:55
Hi friends,I have builded application using struts. I upload .xls file in MySql database and then display all data on applet in barchart format. Now i want to save this chart present on applet as image (prefferabley .jpg format) so that i can mail it as an attachment.

composite-id + hibernate

4416 byte By pandev84a at 2007-11-27 7:31:36
hello frnd,i give more about my prblm....this is code that i fetch record...(main)//--xml_config xConfig = new xml_config();Criteria cri = session.createCriteria(xml_config.class);String s="CA";//Query q = session.createQuery("from xml_config config where ...

Using the Transaction's Savepoint and getting Exception

531 byte By jaimatadi@12a at 2007-11-27 7:31:58
Hi, my code is as follows:connection.setAutoCommit(false);Statement stmt = con.createStatement();execute Query 1. // 1Savepoint s1 = conn.setSavepoint(); // 2execute Query 2. // 3i m using the JDBC-ODBC bridge driver.when the statement 2 executed the exception occurs as follows: ...

leave connection open or close

495 byte By Ehsan.Sa at 2007-11-27 7:32:38
HelloI have an agent(s) that updates my database every week. The agents taks around 3-4 hours to do it job and update the database. The problem is that it must update each term one by one, there are 5000 terms for each agent . Which method is better: 1: for each termopen connection, update, ...

CLOB not converting 8 bit extended ASCII characters properly on Linux

553 byte By lily_in_usa at 2007-11-27 7:34:46
Hi,I have few 8 bit extended ASCII characters in database. When I retrieve them using CLOB and convert the CLOB to String then the characters are getting corrupted and I don't see what is stored in database.It is happening on Linux Environment whereas it is working on Windows Environment. Is ...

java postgresql

765 byte By pompeighuIIa at 2007-11-27 7:34:52
Hi, when i get the value from a column set as Date type in postgresql, i get it as yyyy-mm-dd the thing is that i want to get the date as mm-dd-yyyy, using netbeans and the pgadminIII i can get the data as mm-dd-yyyy. How can i get the date as mm-dd-YYYY i use in my java class something like ...

Howto: Put RTF files with Pictures into Blob / Clob

2468 byte By bhentgesa at 2007-11-27 7:41:41
Hey gents,I am having a bit of a problem at the moment. My objective is to store RTF files who, at times, contain pictures into an Oracle 9.2 Database.So far, I've tried to use CLOBs and BLOBs; and while getting the data into the database doesn't seem to be a problem, I have all the troubles ...

how can I insert a DB in my java application?

250 byte By ChackaPa at 2007-11-27 7:41:42
hello every body!I want to use a database (Hypersonic SQL) into my application.but i don't know how insert it on my application, so from when can i start?please send me link if you know any online tutorial .thanks.

How to throw a error for a null resultset

310 byte By jamesEstona at 2007-11-27 7:42:36
Hello All,I just discovered that a null resultset coming back from a query doesn't throw any error, it just returns null. What is the best way to catch this when the resultset is null? I have a try/catch block and I just want to log the error if it's a null ...

storing and retrieving a java method in MySQL

697 byte By nmtestgeeka at 2007-11-27 7:43:20
I am a high school math teacher. I'd like to use computers to ask incoming students a series of math questions to test their readiness for a class that I teach. Is it possible to store and retrieve a mathematical expression in a MySQL database such that it can be recalled and used to evaluate ...

setAutoCommit behaves odd

4129 byte By ChrisGoesPlacesa at 2007-11-27 7:43:33
Hi!I am currently working on a project where I am providing DB access for others.My code looks as follows:private static Connection dbConnection;private static Statement statement;private String databaseUrl = null;private String driver = "com.ibm.db2.jcc.DB2Driver";...private Connection ...

How best to manage connections

539 byte By silvousplaita at 2007-11-27 7:45:16
I am rewriting an application in Java. There will be 1-20 people accessing the DB. I don't yet know how many concurrent connections will need to be open. It could also be from 1-20.Should:1) Each person establish a single connection for the day and the connection remains open until they close ...

how to change the image into byte and byte array into image

111 byte By devisria at 2007-11-27 7:46:37
now i am developing one project. i want change the image into byte array and then byte array into image.

How to connect Sql Server 2000 using JDBC ODBC Driver

98 byte By NikisinProblema at 2007-11-27 7:46:55
How to connect Sql Server 2000 using JDBC ODBC Driver ?plz Send Syntax.thanks

how can i collect values from database using OR condition?

2112 byte By senthil_yogaa at 2007-11-27 7:47:04
have a table containing employee and language ...I have a select box containing languages and if i select two languages and click on submit.it should do collect all employees having either of the languages using OR condition..how can i do this out..i have written some code and i will show ...

MySQL connection problem

993 byte By modjojoa at 2007-11-27 7:48:25
I'm using NetBean IDE 5.5 and and I want to connect to MySQL database at my computer but it can't get connectedI already download the MySql connector from MySql web and it still cant proceed. Could someone show me how to do it properly, thank you in advancethe code:String url = ...

jdbc MSSQL 2005 connection problem

2700 byte By Sideina at 2007-11-27 7:51:56
I am trying to connect to a database I created with Microsoft SQL Sever Studio Management Express 2005 and I am receiving the following error:com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connectI ...

Need suggestion about Image storage

924 byte By PriyankaChaurishia123a at 2007-11-27 7:52:49
Hi Guys,I am having a JPEG Image in remote location. I am downloading this as belowprivate byte[] getImageBytes(String imageURL) throws Exception{URL url = null;URLConnection urlConn = null;InputStreamReader inStream = null;url = new URL(imageURL);urlConn = url.openConnection();inStream = new ...

java.sql.SQLException: Connection.close() has already been called

153 byte By islandhopea at 2007-11-27 7:53:10
I'm getting this exception while pressing on save button from my jsf page. Could anyone tell me what might be the cause behind this?Thanks

Records from 2 tables + hibernate

1008 byte By pandev84a at 2007-11-27 7:53:17
Hi frnds,i have two tables one id field is commen between both but not related to each other(like forignkey-primary key)..the condition like this...Table 1: Master(id,name)Table 2: Detail(id,class)(No forignkey-primary key relation) but records are like followsOne record in Master and id is ...

incremental search in hsqldb?

276 byte By gantengxa at 2007-11-27 7:53:31
Is it possible to do that?I'm thinking of making application like itunes, but i just can't figure out how itunes does the incremental search and return the result so quickly (as you type).Anyone knows how to do that? Is it possible doing it with hsqldb?

problem using resultset.getRow()

274 byte By nileshmcs@gmail.coma at 2007-11-27 7:54:16
hello frnds,I got the right row by using resultset.last() it also prints th last row of resultset but if i use resultset.getRow() it prints value -3 if any one have solution for this problem,pls help me....thanks and regards..nilesh

Date difference between Java and db2

445 byte By balteoa at 2007-11-27 7:54:36
Hello,I am quite puzzled. I have the following environment:-iseries DB2-Jdk 1.5-Hibernate 3 (jpa)-Tomcat 5.5When I have "31st December 2006" in the database, the webapp displays "30th December 2006" and so on.I don't understand this one-day difference?Does anyone has some clue of why I get ...

Can't Get to System/DSN

931 byte By Nidhuggura at 2007-11-27 7:55:21
Aye,I've got an extremely strange problem.First of all, my apologies in advance for my lack of knowledge when it comes to the pc's terminology. My computer is in Dutch, so things as 'control panel' all have different names. I'll try to be as clear as possible.When you want to add a new ...

connectivity problem using mysql

6383 byte By scshekhara at 2007-11-27 7:55:31
Iam using eclipse 3.2 IDE and Tomcat 5.xI am trying to connect to the database and get the access denied error. Any idea what I might be missing here.****************************************************************************ERROR ...

Paging

537 byte By CrazyAboutJavaa at 2007-11-27 7:55:51
Hi All,I'm implementing an application, where i'm picking data from MySQL database using jdbc, now this data is very large, i mean can be in millions. This much of data can't be displayed on one page. I want to implement paging system, so that i can show only 25 records on one page. The one ...

one hibernate entity many tables

1067 byte By Kernel_77a at 2007-11-27 7:56:48
hi , i have a large DB (60gb+) of stock option in 1 minute intervals so it's a very large DB and growing daily 1 month of data generates approx 0.5Mil rows (480min*50options*20tradingdays) untill lately i've used a file XML DB but it's getting out'a hand so i've decided to move up to mysql ...

SJSAS 9 connect to DB2 9 error?

659 byte By Kidda at 2007-11-27 7:57:20
I hava a java class for connecting to DB2 9:Class.forName("com.ibm.db2.jcc.DB2Driver"); conn = DriverManager.getConnection("jdbc:db2:POI",username,password);I wirte a main() for this to validate the connection and it's ok. But when a jsp invoke it to connect to DB2 9, there is an error ...

problem with deadlock

2494 byte By lance_dragonsa at 2007-11-27 7:57:38
I'm working on a series of servlets that allow manipulation of a database, and I need to be able to prevent deadlock or hanging if data is being changed by someone besides the user.If this is done within the program, I can prevent it by committing the changes soon after a change, not allowing ...