Retrieving Status Messages from a StoredProc

418 byte By jintokla at 2007-11-27 5:23:42
Hi,We are having a StoreProc which will not return any result set, but may return status messages like "10 Rows affected" etc.Do you have any idea how to retrieve these messages? Please note that there will not be any PRINT statement in the StoredProc. These messages are coming from the ...

Creating a dynamic SQL query builder class

1843 byte By al18exa at 2007-11-27 5:24:09
I have a jobs table where each row contains information about jobs run on a machine. I have a web view of this database which shows different information and queries for this information are built using the following fields:TYPETITLENODESTATUS (an array of 4 different possible ...

Database ResultSet being shared by different users

503 byte By holidaych1881a at 2007-11-27 5:24:28
I developed a JSP based web app on Tomcat 4.1 that connects to a SQL Server 2000 database. When one user is using the system it works fine, but when a second user accesses the same data on a table.. it seems the second user takes the result set from the first user and displays both (while the ...

Java and MySQL

855 byte By Leo77a at 2007-11-27 5:25:55
Hi...I have an application made in Java that works fine with MySQL. However, I'm using it in a local host (all things in the same machine) and I need to allow all the computers in my LAN to have access to the database.I've already put my database in a shared folder (where all computers in my ...

INSERT statement to MS Access

312 byte By houseofwraitha at 2007-11-27 5:25:57
Hi,I am trying to insert this into my database but because of the speech mark I keep getting an errorINSERT INTO database (field1, field2) VALUES ('Don't do that', 'Stop it')The ' in (don't) means I keep getting an SQL error. Is there anyway round ...

number of rows returned by SELECT LAST(column)

416 byte By Booh1a at 2007-11-27 5:26:42
I have about 50,000 rows in my MS Acess database table so I have used SELECT LAST(column) AS newField FROM table... to retrieve the last data in the column however when I check the number of rows in the resultset using resultset.last();int rowcount = rs.getRow(); rowcnt returns the total ...

Books for servlets, Jsp and Struts

399 byte By chend07a at 2007-11-27 5:27:50
Hi ,I prepared coreservlets material for Servlets and Jsp that is available from www.coreservlets.com. but, I am not satisfied with that as there is no complete explaination for all method and etc , with example.can you please tell me good ( with full explaination) book for Servlets and ...

PROBLEM with using multiple PreparedStatement object

1871 byte By amol_0008@rediffmail.coma at 2007-11-27 5:27:54
Hello friends i have following code in which m using Two Statement Object's <%@ page import="java.sql.*,com.example.model.*" session="true" %><%!ResultSet rs1,rs2;Statement stmt1;Statement stmt2;Connection con;%><%dbcon cn=new ...

giving error with setDate

708 byte By Atmaling_Kshirsagara at 2007-11-27 5:29:00
When i am trying to update a date field in Database its giving Error as:"The method setDate(int, Date) in the type PreparedStatement is not applicable for the arguments (int, Date)"I have written following code in JSP, This code is running fine for the string and integer data types using ...

Regarding Preparedstatement and ResultSet

505 byte By GloomyProgrammera at 2007-11-27 5:29:35
Hi All,I am using a select statement in my program like select ename ,dob from emp where empno = ?.....for this I will have to use PreparedStatement ......but how do i fetch the values of ename and dob in variable after setInt(1,empno)previously i had used ResultSet to store the ename and dob ...

Problem with OracleDataSource

2379 byte By GameOvera at 2007-11-27 5:29:47
Hi I am using OracleDataSource in my StandAlone ApplicationBelow are functions of class which configure datasourceprivate void configureDataSource() {try {// Load the properties file to get the connection information// from the Connection.properties fileProperties prop = ...

Getting Data From a DB?

180 byte By Alex1989a at 2007-11-27 5:30:18
how would i get data from a database and put its contents into something visual? say for instance a persons name, number and email address put into a jpanel for a phonebook?

Bug in Oracle JDBC Pooling Classes - Deadlock

8072 byte By dpoggemanna at 2007-11-27 5:31:25
We are utilizing Oracle's connection caching (drivers 10.2.0.1) and have found a deadlock situation. I reviewed the code for the (drivers 10.2.0.3) and I see the same problem could happen. I searched and have not found this problem identified anywhere. Is this something I should post to Oracle ...

application performance

442 byte By NourElsaftya at 2007-11-27 5:32:34
Hi all, I am now developing a database desktop application, I want to get the better performance in connectin to database, I am using mySQL5.I want to use connection pooling to reduce the connecting and reconnecting time, but I want an implementation of jdbc connection pooling with desktop ...

What is use of transaction when we insert record?

189 byte By Legolas.wa at 2007-11-27 5:32:45
HiThank you for reading my postis there any scenario that we may need transaction isolation when we delete (one or more) record?can you elaborate ?Thanks.

Creating a dynamic query by choosing the field and getting the report

599 byte By ReshmaCBa at 2007-11-27 5:34:06
Hi,Is there a way to create a report by allowing the user to choose a field from the table and design a query based on that field.Ex In a table students with fields(StudentNo, StudentName,Age,Qualification,Hobbies, PlaceofBirth)Is it possible to generate a query select * from students where ...

mysql question

379 byte By bif_fa at 2007-11-27 5:34:55
i know that this might not be the place to ask this question but please help....i had an access table that i converted to a mysql table...this table have a field called cust_id that is of INT type and that was auto incremented by access... how can i achieve the same effect in mysql every time i ...

tables rows problem with access

1316 byte By mublata at 2007-11-27 5:35:02
dear people..in this code i wanted to get all rows from table "topic" and add them to string "subject"and the string "subject" with be sent over a socket to a clientthe client will only tokenize them and add every token to a combo box.when the program runsthe client adds "ONLY" the last row ...

oracle ORA-00020: maximum number of processes (150) exceeded

20640 byte By roger5089a at 2007-11-27 5:35:43
Dear all how can i fix this problem when i had one connection pool with orcale by jdbc and the connection size is only 10 , and i donot know why that's easy to by a maximum number of processes (150) exceededpackage OConn;import java.io.*;import java.sql.*;import java.util.Vector;import ...

SQL Server 2005 URL

264 byte By khan_vu2007a at 2007-11-27 5:36:08
hi,i have problem regarding SQL Server2005 connection in Netbeans IDE.i hava downlaoded driver and installed it.but the problem is that i don't know that is the URL .if someone explain it i will be greatfull to one.thanks

How do i connect to sql server using java?

118 byte By miroprocessora at 2007-11-27 5:36:51
hi ever bodyi need to connect to sql server using javawhat is the driver i will use?thanks

Parse .sql file

166 byte By wilsonetoa at 2007-11-27 5:37:39
Hello I wish to parse a .sql file and execute the queries in it, I have looked up for some solution but could not find one. Any Clue?ThanksWilson

Instantiation Error in JAR file

496 byte By Unca_Albya at 2007-11-27 5:37:55
I have a Sybase database using jConnect-5_5.When I run the main class directly --java MainClass arguments-- it works fine.Then I try creating a JAR file. The manifest file reads:Main-Class: MainClassClass-Path: path to jconn2.jarBut when I run it --java -jar jarfile arguments-- I get this ...

Maximum Parameters for PreparedStatement

752 byte By Unca_Albya at 2007-11-27 5:38:01
I don't remember the specifics, because I made a workaround -- but --When using the PreparedStatement, is there a way of INcreasing the maximum number of parameters that can be passed in?I'd gotten some error message on the 12th parameter saying that I'd gone over the maximum. The error went ...

JDBC Driver Problem

2512 byte By devika78a at 2007-11-27 5:38:36
Hi everyone I have a problem I want to use a database for a project I'm working on using MySql I've created the database populated the tables and all that I also downloaded the JDBC Driver from the MySql website called connector J I've changed my Classpath to what it says in the ...

Best Practice to fetch SQL Server data and Insert into Oracle Tables

306 byte By ponica at 2007-11-27 5:39:36
Hello,I want to read sqlserver data everry half an hour and write into oracle tables ( in two different databases). What is the best practice for doing this? We do not have any database dblinks from oracle to sqlserver and vice versa.Any help is highly ...

Remote DB connection in jsp

144 byte By ravi-kumar-123a at 2007-11-27 5:40:53
hi all...can i connect to remote db from jsp?can any one give me the connection string for that?thanks in advance...

problem whit multi value in query

583 byte By mirko81a at 2007-11-27 5:41:01
hii need create a query to send do statement very strange.i have in input a stream of result es.(value from 'BIN' to 'FIN') and i need create a query take all element between this 2 elementes. if in input i have ' A' and 'C' i seacrh in table all record:select * from TABLE where FIELD ...

getHibernateTemplate().save(object) return value ?

306 byte By hemanthjavaa at 2007-11-27 5:41:18
I am inserting an object into the database using the getHibernateTemplate().save(object)Does the above return any value. Probably something like a 0 or 1 such that based on the correct insert I can do my business logic. Or does it throw an exception if an insert does not ...

Can i store file in Database?

76 byte By ravi-kumar-123a at 2007-11-27 5:41:26
hi all,can i store txt file in mysql database?thankx...

How to insert morethan 1 lakh records

161 byte By sgnana81a at 2007-11-27 5:41:33
Hi All,Can any one tell me how to insert more than 1 lakh records in jdbc program at a time.Tks in advance,Tks & RgdsGnana

Oracle 10g Exception--Driver issues

1917 byte By profilemia at 2007-11-27 5:42:33
public class jdbcdemo {public static void main(String[] args) {String name;int number;String city;String query="select * from employee";try {Class.forName("oracle.jdbc.OracleDriver");Connection con = DriverManager.getConnection("jdbc:oracle:oci:@//localhost:1521/employee","scott","tiger"); ...

Net Beans and JDBC Problem

5042 byte By Morrizlea at 2007-11-27 5:42:53
Hi everybody, I am able to compile and run a program that uses the JDBC withing the Netbeans environment.(I developed the application within that ide). However after building the project, if i try to run it from the command prompt or from windows it does not work . If i run it from the command ...

how to connect MySql database with JSP

72 byte By senthil_yogaa at 2007-11-27 5:43:06
Dear everyone,how to connect MySql database with JSP......

Create an Entity

346 byte By SwingIta at 2007-11-27 5:43:45
Hi,I would like to create a "User" entity, that I will use to ID different kind of other entities, like: customer, manager...The "User" entity will hold "UsereName" and "Password", and each other entity will hold the extra details.Can anyone show me an example of definition for the "User" ...

if "ORACLE not available" how to refresh connection pool

421 byte By Neelima.Sridhara at 2007-11-27 5:45:31
Hi, Sometimes i'm getting this error "ORACLE not available" , but the connection pool was not refreshigng.so after the oracle connection comes, my program is using old connection in pool and not picking the data from the database, until i restart the tomcat server.can anyone give better ...

how to hide username/password in JDBC program.

837 byte By GloomyProgrammera at 2007-11-27 5:45:46
hi All,The support tat I get here is simply gr8.Can someone suggest or send me a link as to how I hide the username /password ....i.e database connection in the jdbc program so as to avoid changing the program everywhere in case username and passwd changes ?I simply want to change the following ...

jdbc

375 byte By TugoSa at 2007-11-27 5:46:35
Hi,I will write a programme in java using jdbc.Unfortunately, i dont know anything about jdbc.so i want to ask some questions?Using jdbc i will write an automate programme so i will need sql,and i have to create an interface.Can you link the resources for sql and compiler.moreover,can you ...

How do I keep proceeding

692 byte By ArcherKinga at 2007-11-27 5:46:46
If there's a null in the table and when the resultset is returned.And when we process the resultset, it throws a NullPointerExceptionlike in the following piece of code.pstmt=con.prepareStatement("SELECT * FROM product where p_id=?");pstmt.setInt(1,id);ResultSet ...

CachedRowSet works with ResultSets?

718 byte By lightbulb4321a at 2007-11-27 5:47:44
I have the following code that doesn't seem to work, where the stored procedure returns a result set (I've left exception handling out of this code for this post):CachedRowSet crs = new CachedRowSetImpl();crs.setCommand("{call ...

Can you create a MySql DataSource in a Context?

1713 byte By mamgeorgea at 2007-11-27 5:47:52
I am trying to learn how to use datasources to get connections, and I am successful in doing this for the MysqlDataSource in this way:connection = mysqlDataSource.getConnection();However, I want to try to retrieve the connection via a Context,and am unsuccessful in creating the initial ...

connectivity with Oracle

2814 byte By jin412a at 2007-11-27 5:49:00
Java servlet:Netbean 5.5(server and database connection working):Oracle database 10g:Goal:retrieve record from oracle databaseProblem:no record appearWould you please see the blow code and help me? thank you so much in advance.import java.io.*;import java.util.Enumeration;import ...

Keyword Search

198 byte By AlaNioa at 2007-11-27 5:49:21
I'm trying to implement a keyword search. I currently have one using LIKE %keyword% but this doesn't work for multiple words. Is there a way of implementing a multiple word one ? Using DB2.

how to use prepareStatement

1705 byte By lnthai2002a at 2007-11-27 5:50:51
Hi ,I am trying to use prepareStatement to boost up my database queries. To provide maximum flexibility to user, i need 4 queries like this:1/SELECT * FROM mydb.mytable WHERE coumn1 < 123;2/SELECT * FROM mydb.mytable WHERE column2 = 'ABC';3/SELECT * FROM mydb.mytable WHERE column1 >234 ...

how can i improve database connectivity with connection pool

692 byte By lnthai2002a at 2007-11-27 5:50:55
Hi, I used to create a connection to DB per session since the application is pretty small. Now i want to improve the db connectrion with connection pool. However, i am still confused since the book i read says that i have to change something in server.xml in the tomcat server while other people ...

How can i use hibernate ....

223 byte By pandev84a at 2007-11-27 5:53:17
Hello frnds,I am new to hibernate, I want to use hibernate with j2sdk1.4.0_02.Currently i use eclipse as jre 1.5_05 it runs okbut when i use j2sdk1.4.0_02 it not working so please help me.

Problem with big table (Oracle DB)

738 byte By zoran.nikolovskia at 2007-11-27 5:53:22
Hi,We are designing a history reporting system and since the customer wished for a generic DB solution we needed to create one very big statistical table to hold statistical value information. The problem is that this table is being updated each 10 minutes with statistical information and for 3 ...

Connecting with oracle

374 byte By _abhia at 2007-11-27 5:53:28
Hi all!I am using jdk1.6 and oracle 9i. My jdbc driver is classes111.jar. Though this is getting loaded but i am not able to connect my application with database. Connection string is- Connection conn = DriverManager.getConnection("jdbc:oracle:thin@localhost:1521:<SID ...

Pagination using CachedRowSetImpl

865 byte By Java_persona at 2007-11-27 5:54:57
Hi ,I have some problem with paginaiton using CachedRowSetImpl.Here is my codeCachedRowSetImpl set = new CachedRowSetImpl();set.setPageSize(10);set= (CachedRowSetImpl) db.getScrollableRecords("select * from table"); while (set.nextPage()){while (set.next()){MyLogic()}}When I run above this I ...

JDBC DRIVER

285 byte By akillisea at 2007-11-27 5:55:18
Hi is/are there any Jdbc driver(s) that can be used to connect Ms Access Database Un like as most of people uses jdbc-odbc to connect ot Ms Accessi need only "Jdbc " driver to do sois there any different approach to connect itthanks in advance