Print Report

75 byte By jiong_ronga at 2007-11-27 10:51:10
<p>Hi, how to print data on paper or report from jdbc by sql statement?</p>

MS Access DB with Spaces in Column Name

1404 byte By purduephotog2a at 2007-11-27 10:51:18
Good Afternoon-I'm having some serious headaches with a table that I need to extract information from. The powers that be wrote it with the following column names "Contract Number" , "Customer Number", "Description".Note the spaces in the columns.Sample code from here: ...

Connection Pooling with thin driver for Oracle 9i

528 byte By betseyba at 2007-11-27 10:51:24
I know how to create a DataSource that utilizes connection pooling for my webapp using my web server. The problem is that my DAOs are also used for a standalone app, as well as standalone testing. I'd really like to be able to use connection pooling for that as well. As far as I can tell, though, ...

Saving Data back to DB Takes Forever

2284 byte By bce_developera at 2007-11-27 10:51:37
Hi,I've created a multithreaded application which reads in data from a Database A (on Sybase Server), performs number crunching on the data, and saves the data to Database B (on SQL Server). I'm using JTDS for the sql server and JConnect (Sybase Drivers) for the Sybase server. The problem is it ...

JDBC

578 byte By sreelaxmia at 2007-11-27 10:54:28
Hello friends,Iam doing one project which involves client and server architecture.I am storing the data in database and when each client request for the data it should retrive the data from database this part i have done but my question is when first client sents request for the data in the ...

JDBC through proxy or how to call remote database behind a firewall

241 byte By veranta at 2007-11-27 10:54:32
<p>Good day,</p><p>What tecniques are used when developing GUI applications with JDBC connect to remote database if some clients will be behind HTTP Proxy servers?</p><p>Any recomendations how to build such apps?</p><p>Thanks in advance.</p>

i am not able to connect to the oracle database using JDBC

1566 byte By shubhanshu_javaa at 2007-11-27 10:54:35
I am trying to perform insert operation in the oracle database thru applet ...i want to enter data in the database thru applet....but i am not able to establish connection to database.... Perhaps there is a problem with the line given below....Connection con = ...

Framework for Databaseoperations

414 byte By jk84a at 2007-11-27 10:55:18
Hello everybody,i am new in this forum. And i am from Germany. excuses errors in my way of writing.I am looking for a Java Framework that protects me by handling with Database.It is important for me that the Framework have possibilities to copy Table or determine Constraint dependence for tables or ...

Get timestamp with timezone from Oracle

566 byte By vilacovaa at 2007-11-27 10:55:48
Hi!I've a table with TIMESTAMP(6) WITH TIME ZONE type. When I retrieve data:java.sql.Timestamp dbSqlTimestamp_in = rs.getTimestamp(1);java.sql.Timestamp dbSqlTimestamp_out = rs.getTimestamp(2);System.out.println("dbSqlTimestamp=" + dbSqlTimestamp_in);System.out.println("dbSqlTimestamp=" + ...

how to make BETWEEN QUERY for string variables

459 byte By smallkida at 2007-11-27 10:55:52
hi ,i have to pick some value from given string variable using SQL statement,the upper limit and lower limit is given by user and then i hav to pick all string variable name who fall between this range ex:ram josp tera mike sita atulramesh hira these are 8 name , if user pick "josp"(as upper ...

PreparedStatement, setString() and setInt()

1387 byte By maitya at 2007-11-27 10:57:21
Hi,I am using PreparedStatement in my JDBC program and using the setString() method to replace the placeholders with values dynamically.PreparedStatement pstmt = new PreparedStatement( "INSERT INTO MYTAB VALUES ( ?, ?, ? )" );BufferedReader br = new BufferedReader( new InputStreamReader( System.in ...

using JCheckBox/JComboBox with JDBC

550 byte By james-mcfaddena at 2007-11-27 10:57:59
hello.i was just wondering does any of you have links to web pages that include tutorials (and source code) on using JCheckBox with JDBC. would any of you who have experience with using JCheckBox and JDBC together be able to give me a few tips on how to select certain data from a table using ...

Insert JSP form into MySQL

7839 byte By zerokidza at 2007-11-27 11:01:03
I tried this code but it got this error.org.apache.jasper.JasperException: Exception in JSP: /tutorials/insert_test.jsp:143140: Driver DriverInsert = (Driver)Class.forName(MM_db_DRIVER).newInstance();141: Connection ConnInsert = ...

get last id from table

1482 byte By ubarua123a at 2007-11-27 11:01:08
HI.. i got a table with three entries right now. One of the columns is a primary key auto increment. My problem is i need the last generated auto id. I went through the manual, it said theres a function "last_insert_id()". The problem I m facing is, it was throwing a null pointer exception.Then I ...

MySQL issue: Exception while getting MetaDataInfo

2179 byte By Sandeep009a at 2007-11-27 11:01:40
Hi Folks,Our application is starting MySQL internally during startup.Sometimes, I get the following exception and MySQL doesn't start:[09 Jul 2007 14:05:35:733] Exception while getting MetaDataInfo : Can't create/write to file 'C:\DOCUME~1\sridhar\LOCALS~1\Temp\#sql_884_0.MYI' (Errcode: 13)[09 ...

SQL Query?

356 byte By tamilvanana at 2007-11-27 11:01:46
hi friends,i am using hypersonic databaseusing this query to select * from validuts where macaddr='0x00:00:00:00:00:02' or macaddr='0x00:00:00:00:00:03' or macaddr='0x00:00:00:00:00:01'how can i form the java code ?Thank ...

Getting birthdays in the next 30 days

759 byte By myncaa at 2007-11-27 11:01:52
Hello,i have a database which is filled with information about all the people you know. One of the columns in the database is the birthday of this person.Now i would like to know which persons gonna have their birthday in the next 30 days. If it is possible I would get these persons with 1 ...

Prepared Statements with Changing Database

833 byte By wes_614a at 2007-11-27 11:01:58
Hi All,Long time since i've posted but always good to get input from real pro's...even though i'm now doing some work for a company myself :)Situtation: I have a set of prepared statements that will get executed a varying amount of times dependant on the number of records prepared to be mailed ...

Updates using ResultSet

1030 byte By abenstexa at 2007-11-27 11:02:43
Hi list,I am using PostgreSQL. In the database I have a view with a join over two tables:CREATE OR REPLACE VIEW test_view AS SELECT a.pid, b.diaFROM lab.stammdaten aJOIN lab.dia b USING (pid)Now when I want to update (field dia) the resultset obtained from the view, I get the following error ...

Close all JDBC Resources using connection object.

588 byte By classPuneeta at 2007-11-27 11:02:51
Hi,I have a connection broker class that gives connections to the clients. What i want to do is close all JDBC resources that were created using this connection object like Statement, PreparedStatement, ResultSet etc. I cannot close the connection as the connection might have to be reallocated. If ...

CAN A DEVELOPER BRAIN EXPLODE!!!!

1048 byte By QussayNajjara at 2007-11-27 11:03:24
Hi to all, just wanted to share my problem which i can't find a solution for, and i don't even find it reasonable...public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException {int timeInSituation = ...

Derby Date search format?

667 byte By jawadaha at 2007-11-27 11:03:32
HiI'm using derby with my application. And problem is that when i search database with date every format its fine except'7/18/07' ( mm/dd/yy). it gives no result. e.g.select * from table where Date between '6/18/2007' and '7/18/2007'its fine and give the result like2007/18/7...but when i ...

Are there any SQL statement generators/examples?

345 byte By smiles78a at 2007-11-27 11:06:54
If you have somewhat infinate amount of querying you can do - combination of certain fields matching values... how can you construct it without writing so many separate SELECT statements? Is there any SQL generator code which you give it a column name and X number of values and it constructs it? ...

Running MySQL script on remote computer.

334 byte By kalnakaa at 2007-11-27 11:07:12
Is there any way to run a MySQL script located on a local machine on another computer located on the same network given that you already know the ip address, port number, MySQL username and password, and the database name. I am investigating trying to send the file across the network, but have not ...

Using Tomcat Admin DSN and jdbc

1826 byte By griffindja at 2007-11-27 11:07:18
Ok so I have a normal jdbc connection hard coded into my DAOFactory class that works fine.try{String DBURL = "db url"DriverManager.registerDriver(new SQLServerDriver());Connection con = DriverManager.getConnection(DBURL);return con;}catch(){exection code}Since it's not good to hard code the url as ...

Primary Key Conflicts While Inserting Rows

503 byte By bce_developera at 2007-11-27 11:07:43
Hi,I am inserting some rows into a table which has primary key constraints on columns 1,2,3. I have set the key columns in my program to 1,2,3. When I try to insert a row it throws a syncresolver exception stating that there is a key conflict. But i don't understand why it is doing this because ...

java.lang.ClassNotFoundException

2118 byte By Jonathan_Garciaa at 2007-11-27 11:08:14
Hi, i need help with this problem, im getting this exception:java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver in this line: Class.forName("oracle.jdbc.driver.OracleDriver");this is the complete list of errors reported:java.lang.ClassNotFoundException: ...

Need Help With Eclipse BIRT

271 byte By guguBananaa at 2007-11-27 11:08:33
<p>Elloo!</p><p>I am using Eclipse BIRT to generate reports and I am having troubles connecting to postgresql database using JDBC Driver. If anyone has used Eclipse BIRT and have had the same trouble, can you tell me what I may be doing wrong.</p><p>Thanks a million!</p>

How do you guys handle String constants for table names, columns, etc.

400 byte By smiles78a at 2007-11-27 11:08:54
Instead of having the strings hardcoded in all the SQL statements, I was thinking isn't it better to have them as constants in one location? My project lead says to use Enum values. What is wrong with having a public static final String for every column name and table name? Is there a better way ...

verification on delete statement

1453 byte By Abhi_The_Software_Nerda at 2007-11-27 11:11:24
Hii need a verification on delete statement and am trying to execute this delete using prepareStatement and through parameter passingthe code is given below.plz do let me know the problem with the statement=============================================================public void doDelete(RunData ...

verification on delete statement

1286 byte By Abhi_The_Software_Nerda at 2007-11-27 11:11:26
Hii need a verification on delete statement and am trying to execute this delete using prepareStatement and through parameter passingthe code is given below.plz do let me know the problem with the statement=============================================================public int delete(String ...

Unable to connect the SQL database from servlet

886 byte By nitin403a at 2007-11-27 11:11:33
Hi!My servlet connects with an SQL server on some other machine.I have create the servlet and deploy it on tomcat.I first create this servlet on eclipse that I deploy it on tomcat manually.While using it form eclipse it gave no error in connecting with the server.But when I deploy the same code on ...

.Jar to connect to .mdb (Access Database) problem...

1183 byte By SiForstera at 2007-11-27 11:11:42
public static Connection getConnection() throws Exception{Connection con;Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");// set this to a MS Access DB you have on your machineString url = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=data\\db.mdb";// now we can get the connection from the ...

Creating MS Word and MS Excel Reports , please help

343 byte By Maba@ULa at 2007-11-27 11:12:32
Hi all.I am using SQL Server 2000 and Java and will want to retrieve data from the database and create MS Word and MS Excel report, so can please any one assist in this regard, maybe by specific sudes with tutorials or some sample codes. I have tried to google it around without any success.Thanks ...

java.sql.SQLException: ORA-01006

4358 byte By Wcflya at 2007-11-27 11:12:47
Hi everybody,I've an issue, and can't find an answer. (I've been searching on google, reading these forums, reading examples, ....) but didn't find my answer.Here is my problem:I have an application who needs to update, insert or delete records in an Oracle DB. For the update and delete no ...

difference between executeQuery and executeUpdate

190 byte By AlberAlbanDeVrila at 2007-11-27 11:14:27
<p>I am new in may current job. I have a program that make a INSERT using executeQuery. The program is in production and I don't change to executeUpdate. this is a problem?</p><p>thanks</p>

problem with update query

789 byte By javapria at 2007-11-27 11:14:34
Hi ,I am new to JDBC and requesting this help from you all.I have a table in MySQL db and the tabel consists of 3 columns(nodeid(integer),parentid(integer),nodename(varchar)).this is a chatroom application and each time a user joins the particular chatroom,i should update this table.I should first ...

How to establish a trusted connection with JDBC for SQL SERVER 2000

819 byte By nitin403a at 2007-11-27 11:15:06
Hi!I am using jdk 1.4 and eclipse 3.3.I create a servlet in eclipse with in-build tomcat.When I run it ,it was working perfectlly has it was suppose to work.In this servlet I connect to a sql 2000 database using jdbc-odbc bridge driver.But when I tried to deploy the servlet on tomcat 5.5 manully on ...

Driver class not found?

1061 byte By bellcla at 2007-11-27 11:16:25
I'm using Java SE 6 and NetBeans 5.5, and I'm trying to connect to a JavaDB database that I created through NetBeans, but when I try to load the driver using Class.forName("org.apache.derby.jdbc.EmbeddedDriver") I get a ClassNotFoundException. The same thing happens when I try to use ClientDriver ...

help me with this error

1068 byte By master2007a at 2007-11-27 11:16:53
hi everyone,plz help me with this error java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 6.my code:public class test { public static void main(String[] args) {try{ Connection con; Statement stat; String First_Name="ealfe"; String Last_Name= "david"; ...

need help JDBC masters

1074 byte By QussayNajjara at 2007-11-27 11:19:26
Hi everybody;i'm doing a web app to record TimeIn and TimeOut for the employees of the company...now each branch of the company has a different timeIn (for ex. 10.00 or 8.00,,) and this is all stored in the DB..what i'm doing is that i'm taking this time from the MS SQL DB as Timestamp, and ...

JExcelAPI unable to output excel to servlet for user download

2595 byte By liangtehza at 2007-11-27 11:19:40
import java.io.IOException;import java.io.OutputStream;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import jxl.Workbook;import jxl.write.Label;import ...

Exception at getConnection from pool

1653 byte By boba5555a at 2007-11-27 11:20:44
Hello,I'm using this...import snaq.db.ConnectionPool;...Class.forName("com.mysql.jdbc.Driver");cp = new ConnectionPool("bazen",0,0,0,databaseURL, "","");...conn = cp.getConnection(); // line XXX...and sometimes I get this exception** BEGIN NESTED EXCEPTION ** java.net.SocketExceptionMESSAGE: ...

What's wrong with my code

1933 byte By MyPermanaa at 2007-11-27 11:21:38
im trying using database with my application, but i have this error :[Microsoft][ODBC Driver Manager] Invalid descriptor indexThe query is like this : SELECT * FROM UserWhich User table has 3 columns (id,name,level)my java code is like this :public ResultSet readData(String query){ResultSet rs = ...

Problem with CREATE TABLE statement

1149 byte By Abhi_The_Software_Nerda at 2007-11-27 11:22:12
Here is the code which tries to create a table using prepare statementthe code compiles and i get the error: Error on Creating Table :java.sql.SQLException: Syntax error or access violation, message from server: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL ...

ClassNotFoundException

522 byte By chellbellea at 2007-11-27 11:22:27
Hi All,I am having trouble getting a connection to the database. When i try and connect, i get the exception ClassNotFoundException com.informix.jdbc.IfxDriver.I know that the ifx driver is in my lib directory and loaded on startup.The line of code it fails on ...

Is that OK to store query Result in String 2 Dimension ?

1256 byte By MyPermanaa at 2007-11-27 11:22:36
Is that OK to store the result of query in String 2 dimension ?im a litle bit confuse about the return value of this method. If i user ResultSet, the ResultSet need to be close. But if the ResultSet is closed, i cannot read data. So i think maybe i should use the String[][]. Is thar ok if it use ...

how to return connection to Connection Pool &to overcome TooManyConnections

3059 byte By sreand_1428a at 2007-11-27 11:23:55
Hi all, My project is done in Tomcat 5.0 with Mysql 5 as backend. Through tomcat admin console i have configured datasource named "mine" with all the attributes needed to connect to MySql like url, username,password, Max connections etc. I have written a function named getConn() in one plain java ...

Load Oracle JDBC Driver by reflection.

1928 byte By dfundaka at 2007-11-27 11:24:00
Hi!I'm trying to load driver by reflection like this, try { URL ora8libURL = new URL("file:///C:/oracle/product/10.2.0/clientDev/jdbc/lib/classes12.jar"); Class.forName("oracle.jdbc.OracleDriver", true, URLClassLoader.newInstance(new URL[]{ora8libURL}));Enumeration<Driver> drivers = ...

connection pool implementation

534 byte By 83Krisha at 2007-11-27 11:24:31
hi friends i created my own connection pool class,iam used that sucessively by creating the connection pool object before the creation of serversocket and then passes the connection pool object after the client socket connected.It works fine in this core java application.I needto implement my own ...