"Current" schema and Oracle Connection

620 byte By crasniera at 2007-11-27 5:55:57
Hi all !Is it possible to get the current schema name for an Oracle connection ?We don't want to execute a query but we want to use the DatabaseMetadata if it is possible... or another stuff like this...Moreover, something like createStatement().executeQuery("SELECT 'FOO' FROM ...

Oracle and JDBC frustration

619 byte By jwarzecha at 2007-11-27 5:56:08
I have been pulling my hair out trying to get this to work, perhaps someone has a solution.I am trying to get a connection between Java (JDK 1.4.2) and Oracle 8 using the classess111.zip package. I finally was able to get a driver connection but when I run the application I get a ...

how to use wild cards in search engine to search

523 byte By senthil_yogaa at 2007-11-27 5:56:29
Dear every one,how to search particular data in database using AND operator...i have used LIKE operator to search and am able to retrieve datas....but the problem is how to search the datas using AND operator...eg: if i am searching for employees based on skills..ie java and jsphow to get only ...

Sqlite, create .db-file

249 byte By rejeepa at 2007-11-27 5:56:56
Hi!I just read this short howto for Sqlite in Java: http://www.pysquared.com/files/Java/JavaSQLiteExample/But how can I create the .db-file from the java code?In the example it's created from the console...Thanks!

how to log in Tomcat administration page

517 byte By jin412a at 2007-11-27 5:57:07
downloaded apache-tomcat-6.0.10OS:window xpTomcat's servlets/JSPs execute fine, but Tomcat denies access to the Tomcat Manager, Tomcat Administration to log in for web application with database connection.The respective webapps and manager.xml and admin.xml are available and seem to look ...

JDBC installation for servlets and jsp

577 byte By lrngjavaa at 2007-11-27 5:57:28
Hello All,I am trying to use JDBC for my web application. i have a book but not very detailed and cannot find a good search on google.they have said that the ODBC-JDBC bridge driver comes with jdk1.2 or forward. and ask me to set up an ODBC data source. so i went in control panel/systems tab ...

inserting strings in a database

1557 byte By aurelian_cla at 2007-11-27 5:57:44
Hello all!I am trying to insert string values in a database with this metode.public void insertData(){[code]try{String url = "jdbc:odbc":"+database;Connection connection = DriverManager.getConnection(url, user, password);Statement status = ...

JDBC Program not going away after closing database records

1532 byte By oaklandara at 2007-11-27 5:57:52
I have Java Servlets and JSP working great with Oracle 9i database using JDBC Thin Driver in our Apache Tomcat Container sitting on Windows 2000 server.Everytime I go into an Oracle record with my Java front end web page I notice that I am opening a program called JDBC Thin Client.Basically I ...

date problem worng date inserted into database

2519 byte By cooljassia at 2007-11-27 5:59:07
hi all,I m writing simple program which has one jsp having one textfiled and a submit button. The textfiled takes date value and after submission value goes to servlet where i m inserting this date value into database using stored procedure. (actully this is kind of requirement in a ...

Prepared statement: java.sql.BatchUpdateException: Internal Error: oracle.j

530 byte By klaasdea at 2007-11-27 6:00:12
Hi, im using a batch to insert a lot query's.It works fine when i insert just a few records(2 000)But now I tried to insert a little bit more (20 000), And then I get the following error:java.sql.BatchUpdateException: Internal Error: oracle.jdbc.kprb.KprbDBStatement@44a41a86.I guess it has ...

Connecting to Database without JDBC API

211 byte By Ravi4Javaa at 2007-11-27 6:00:28
Hi,Can anybody tell me, whether it is possible to connect to a database, WITHOUT USING JDBC API? Its a question asked in an interview? I told, NO. Please clarify.Thanks,Ravindranath Y

Please help how to import text data file in MySql using JDBC application

278 byte By Snezanaa at 2007-11-27 6:01:42
How I can write method in my JDBC application to execute next command in MySql database:load data local infile 'D:\\01 - Prevoz\\prevoz u javi\\sifarnici\\new_MBREL.txt' into table mbrel fields terminated by ';' lines terminated by '\n';

Derby Database Data Types

740 byte By paul_chanceya at 2007-11-27 6:03:34
I used netbeans 5.5 to create a data base on Derby, I executed a sql script to create tables and populate them on my database connection. Mostly it worked fine except I couldn't create 1 tablecreate table Matched(applicant varchar(16),job varchar(16),customer varchar(16),exact ...

creating a new db

598 byte By Mike_Calgooa at 2007-11-27 6:03:42
I want to create a new Derby database using jdbc on the first time an application is run. I am using the following command connect 'jdbc:derby:db;create=true;user=user;password=password'This works fine but I want to know when the table is created so I can execute the create tables SQL. I can ...

returning autogenerated primary key after insertion

219 byte By ketancmaheshwaria at 2007-11-27 6:03:46
HiI am inserting a row into the database using simple jdbc statement. The primary key for that row is autogenerated by the database.Is there any way to get the primary key and return it to the user?

ClassNotFound exception in Eclipse 3.0 using mysql jdbc driver

314 byte By yehuda54a at 2007-11-27 6:04:33
I am having trouble connecting to my mysql database. The code seems to be failing on Class.forName("com.mysql.jdbc.Driver").newInstance(); and gives a ClassNotFound exception.I added the driver to my project as one as the libraries to include -- Why can't it find ...

Detecting NULL Fields in database

229 byte By bce_developera at 2007-11-27 6:04:50
Hi,I'm iterating through a table in a database which contains null entries. When I check if these entries are a numeric value it will return a zero. Is there a way to check if the value is indeed null?Thanks

Inserting Null value into timestamp

383 byte By Mike_Calgooa at 2007-11-27 6:05:04
I am trying to insert a null value into a timestamp and have not had much luck as of yet.I have tried many different values and they keep getting returned with errors. I am creating the SQL statement through a string builder as I need to customize the statement for each insert so I cannot use ...

Database connection and closing

1198 byte By Evergreana at 2007-11-27 6:05:31
I have a connection to a Oracle Database but it doesnt seem to close the connection because the Oracle DBA says I have open connections still active. Please advise how I would properly close a connection that was opened using an object reference (dbconnection) variable:CityDB dbconnection = new ...

servlet

168 byte By raj_123_321_123a at 2007-11-27 6:06:53
when i want to connect to sql through servet the erro is comming no suitable driver ..........................................can some one help me

Connect with the server machine datadase

805 byte By amalkasoftenga at 2007-11-27 6:06:57
Guys I am using MY SQL data base system and I wanna access my server machine data base from my client machine.I used this code to made the connection..try { Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection("jdbc:mysql://10.0.0.1:3306/invoice_ijts", ...

Loading JDB Mysql libraries at execution

628 byte By flaaba at 2007-11-27 6:08:06
Hi =)I'm developing a java app that needs the JDBC mysql driver. And so it figures in my code like this:import java.sql.*;Executing my app from eclipse, works fine.But when executing it from Console...it seems it can't load the controller. Or it does not know where it is:flaab@Debian ...

Sorting A Database Into Alphabetical Order?

169 byte By Alex1989a at 2007-11-27 6:08:59
is it possible to sort a database in alphabetical order, say by NAME? i know about the ORDER BY keyword but that only seems to sort data coming out of a database.

JDBC Questions

2797 byte By Alex1989a at 2007-11-27 6:09:34
i dont know sql too well and this is why im having a problem at the moment. ive been posting a lot lately with different questions and u guys have really helped me out. but i thought that this time id post a few questions in 1 post :)1) i want to be able to update a contact from a certain table ...

BatchUpdates + Forein Keys

1002 byte By Mike_Calgooa at 2007-11-27 6:10:48
I am trying to create a preparedstatement that uses a for loo to insert multiple records at once. The isert works with no problems, however when I try to save data to a supporting table i get Foreign key constaint errors. I am assuming that the problem is in that the insert has not yet ...

basic prob

323 byte By deepikamallyaa at 2007-11-27 6:12:32
when connecting thro' JDBCODBC bridge i am getting following exception :java.sql.SQLException: [Microsoft] [ODBC Driver Manager] Data source name not found and no default driver specified.java.lang.NullPointerExceptionwhat should i do to rectify this and establish a connectivity to a .mdb ...

Startup Derby DB automatically in Netbeans

236 byte By ammaiaa at 2007-11-27 6:13:06
Hi all!Each time I start Netbeans I need to go to my DB Derby and connect it inserting the user name and password.Is it possible in any way to do it automatically when start Netbeans?RegardsJose

Some Table with 500 000 records.

1551 byte By Folia at 2007-11-27 6:13:13
Hi people. :)I will use the Java language first in my life. Before this time I used VS2005 .NET. So I hope you will help me, please. I'm using NetBeant 5.5.1 + Visual Web Pack 5.5.1 + FireBird 2 + GlassFish v2. And I have liked RowSet + DataProvider. But i found some article about RowSet. ...

DB Hosting Problem

2189 byte By farakha at 2007-11-27 6:13:23
I am going through hosting process of my website. I build my db with oracle 9i. i bought a dedicated server which is not managed dedicated server but the hosting company has configured and provided all passwords including root to me as well as the following info provided regarding ...

Oracle 10g and Java v1.5

358 byte By Lasiriusa at 2007-11-27 6:14:31
I have installed Oracle 10g on my desktop and have attempted an installation of Java v1.5 . I am not able to use v1.5 because my Oracle installation is set to Java v1.4 How can I resolve this conflict? I have not been able to find a patch for Oracle on their website, nor have I been able to ...

Zero resultset for MYSQL despite data in tables

2419 byte By MamaPandaa at 2007-11-27 6:14:34
I've been getting zero for all my query result sets even though my database is not empty. I don't know if the problem lies with my servlet code or my resin deployment. Can someone tell me what's wrong?Here's part of the codes.Login.javapublic class Login extends HttpServlet {final String ...

Storing database values

432 byte By ponica at 2007-11-27 6:14:42
Hello,I have a java stored procedure which fetches sqlserver values and inserts into oracle db.Currently I am storing values in vectors, but problem with vector is I have around 15 fields, so I have to create 15 vectors. Could some provide some example of using some util classes like HashMap or ...

When we need to use connection.releaseSavepoint(sp); ?

299 byte By j_shadinataa at 2007-11-27 6:15:04
"Any savepoints that have been created in a transaction are automatically released and become invalid when the transaction is committed, or when the entire transaction is rolled back."when we using transaction, we always end up with commit or rollback. so does releaseSavepoint

Get Date/Time of Changes made to a database or specfic table

429 byte By eversora at 2007-11-27 6:17:18
Hi,I wanted to know how I can access the inforamtion, when a table was created, the last change was made to it.And if it is possible, I'd alos would like to know, if there is a way to get the time when a data row was last manipulated (inserted, updated). Or do I have to build my own solution ...

Access 2003: sql statement question

1064 byte By bassiedudea at 2007-11-27 6:19:45
Dear all,i'm trying to get the following code to work without success:String com = "SELECT Instrument.Index FROM Instrument WHERE Instrument.NextCalDate < #5/24/2007#";s.execute(com);I get the following error: Error: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax ...

criteria withen criteria

760 byte By pandev84a at 2007-11-27 6:19:51
Hello frnds,i have 2 table , i want to write sub query using criteria,my query just like belowselect col1,col2,col3 from table1 where col1=....and col2=... and col3 in (select col1,col2,.... from table 2 where .....)i try to write like....Criteria c1 = s.cre...(table2.class);list list = ...

ResultSet merge

1251 byte By dallwooda at 2007-11-27 6:20:56
Does anyone know if there is a way of creating one result set from two? I need to write a query to return results from two databases that can not talk to each other (!). The results are only seen after some java fantasticness has turned them into an excel spreadsheet using POI. I'm using a ...

MYSQL connector

531 byte By burntcandlea at 2007-11-27 6:22:28
public void firstConnection(){try {Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:test?" + "user=root&password=secret");System.out.println("Got Connection");does not get to the system.out.println, claimingSQLException: No suitable driverSQLState: 08001VendorError: 0I ...

MYSQL connector

366 byte By burntcandlea at 2007-11-27 6:22:38
try {Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306", "root","secret");System.out.println("Got Connection");Does not get to got connection, it says no suitable driver. I've checked the class path, port number and have been told to read the documentation. Can someone ...

Sortinbg DriverManager

615 byte By burntcandlea at 2007-11-27 6:23:19
try {Properties prop = new Properties();prop.setProperty("user","root");prop.setProperty("password","secret");try{Class.forName("com.mysql.jdbc.Driver");}catch (Exception e){System.out.println(e.toString());}Connection conn = DriverManager.getConnection("jdbc:mysql//localhost:3306", ...

SQLException:ORA-00928: missing SELECT keyword

2318 byte By rudraguptaa at 2007-11-27 6:24:20
Hi, I am trying to do a database insert using PreparedStatements. Following is the piece of code I'm executing.StringBuffer query = new StringBuffer();query.append("INSERT INTO" + TABLENAME);query.append("VALUES");query.append("(?,?,?,?,?,?,?,?,?,?)");PreparedStatement pstatement = ...

how to strart auto_increment from 500000? (mysql)

217 byte By xianwinwina at 2007-11-27 6:24:44
Hi all,quick question, I have a table with the following prop:1. ID2. fname3. lnamethe Id is auto_increment. I wonder how can I start the count from say 50000?thank you

java.sql.SQLException: Protocol violation

839 byte By SKapoora at 2007-11-27 6:24:58
Hi,I am using JDK 1.4 with Oracle 9i as backend. I get this error, when I run this program. I have consulted many sites and forums and come to know that this error occurs when Oracle User ID is about to expire & it requires to change the password for the same userid. When I use oracle ...

How to Connect Microsoft SQL 2000 database using JDBC

168 byte By Sana_Boya at 2007-11-27 6:25:33
Hi all..I want to connect Microsoft SQL 2000 database using JDBC. I want from initial steps also. (about JDBC driver & its installation) Thankz

con.createStatement() does not work

877 byte By Sana_Boya at 2007-11-27 6:26:07
hi allwhen i try to connect MSSQL 2000 server using JDBC Connection, the method createStatement() does not work. I import all the necessary java libraries also.here is my sample program which didn't work.import java.sql.*;public class JDBCCon {public static void main (String[] args) {String ...

Creating Stored Procedure in Java

2407 byte By khickyphutza at 2007-11-27 6:26:10
Hi All,I would like to ask how to create a stored procedure in Java.My project now is to create a program that will open a DB2 SQL File (Creating Table and Stored Procedure) and then Execute it.Executing the CREATE TABLE command is not that difficult since I can break the execution down by ...

create a View from tables of different schemas

444 byte By Neelima.Sridhara at 2007-11-27 6:26:47
hi all,can u pls give solution to create a View from tables of different schemas.i have to bring data from one DB Server A, which contains different schemas and tables in the schemas...i need to insert that data in another DBServer B.i made a procedure for this...but when the connection fails ...

problem : Inserting Data from flat file into databse

453 byte By Jmastera at 2007-11-27 6:27:01
Hi,i m reading values from sybase tabel and writing those values into a flat file . some of those values are from table columns which has custom data type. the next thing i do is, read values from file , and insert into different table with the same column definition. the problem is that the ...

Error in Class not found

334 byte By Sana_Boya at 2007-11-27 6:27:26
When i try to connect SQl 2000 database using JDBC, it gives an error indicating "java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver"I alredy set the CLASSPATH correctly & my JDBC driver also installed into my computer.Pls any1 who can help me to solve ...

Setting CLASSPATH

143 byte By Sana_Boya at 2007-11-27 6:27:39
I set the CLASSPATH for JDBC connection. But it seems no to be working. How can i check that i set my CLASSPATH correctly.?Thankz