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 ...
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 ...
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 ...
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!
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 ...
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 ...
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 = ...
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 ...
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 ...
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 ...
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
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';
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 ...
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 ...
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?
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 ...
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
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 ...
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 ...
when i want to connect to sql through servet the erro is comming no suitable driver ..........................................can some one help me
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", ...
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 ...
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.
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 ...
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 ...
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 ...
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
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. ...
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 ...
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 ...
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 ...
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 ...
"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
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 ...
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 ...
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 = ...
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 ...
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 ...
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 ...
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", ...
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 = ...
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
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 ...
Hi all..I want to connect Microsoft SQL 2000 database using JDBC. I want from initial steps also. (about JDBC driver & its installation) Thankz
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 ...
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 ...
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 ...
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 ...
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 ...
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