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
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 ...
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 ...
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 ...
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 ...
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 = ...
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 ...
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 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?
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 ...
I want to get rows insert and last update time, without using user-defined colons. how can i do?Thanks
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 ...
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 ...
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 = ...
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 ...
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!
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 ...
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 ...
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 ...
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 ...
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.
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.
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 ...
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: ...
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, ...
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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 ...
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 ?plz Send Syntax.thanks
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 ...
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 = ...
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 ...
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 ...
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
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 ...
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?
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
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...