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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 = ...
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?
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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 ...
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
hi ever bodyi need to connect to sql server using javawhat is the driver i will use?thanks
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
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 ...
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 ...
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 ...
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 ...
hi all...can i connect to remote db from jsp?can any one give me the connection string for that?thanks in advance...
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 ...
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 ...
hi all,can i store txt file in mysql database?thankx...
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
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"); ...
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 ...
Dear everyone,how to connect MySql database with JSP......
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" ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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