String to Blob (PreparedStatement setBlob())

285 byte By Codewarrior01 at 2007-9-26 10:11:01
Hi!!I am trying to store an xml string (of type String) in a column of type Blob. Is anyone aware of the syntax or methods I would use in order to convert my string into a Blob before I store it in the db?I'm using the setBlob method.Thanks!!

Problem regarding Image save/retrieve

1027 byte By ravalkshitij at 2007-9-26 10:13:50
I encountered this exception only when I try to save a big image. The jpg image was only as big as 5436 bytes.java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG columnThe reason for this exception is explained at http://www.wamoz.com/JDBC_and_Oracle_LOB.asp, ...

Can any one help me on this

1294 byte By tkrajesh at 2007-9-26 10:13:55
I am trying to use EJB2.0 with J2EE Reference Implementation on MS SQL Server with the SQL Server 2000 JDBC Driver. Any help would be appreciated. FYI I changed the client.policy and server.policy(which is needed as per microsoft implementation instructions) in j2ee.Exception in thread "main" ...

Connection to Oracle8i

347 byte By kirandoshi at 2007-9-26 10:14:20
I am able to connect to the oracle database using jdbc odbc driver.For connecting using oracle driversI am able to load the oracle driver using Class.forName(...)but dont know how to create a connection to the database.I tried DriverManager.getConnection("jdbc:oracle:oci8@","scott","tiger") ...

c++ - jdbc connectivity

131 byte By rahulbgandhi at 2007-9-26 10:14:28
Can i connect c++ to jdbc and then do the things like handling Oracle tables ? If yes will anyone please tell me how?

List of Drivers?

292 byte By DeepForest at 2007-9-26 10:15:19
It is my code:java.util.Enumeration e;e = java.sql.DriverManager.getDrivers();for (e = java.sql.DriverManager.getDrivers() ; e.hasMoreElements() ;) { System.out.println(e.nextElement());}But I haven't any string in output. Why?

connect to Oracle

207 byte By DeepForest at 2007-9-26 10:15:21
Class.forName("oracle.jdbc.driver.OracleDriver");I have exception:java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriverHow I can connect Oracle database?

Waiting for connection

1092 byte By axa2001ro at 2007-9-26 10:15:32
HyI have created a class which make the user interface and a class which is taking care of connection to a server.I would like that UserInterface class to waint until the ConnectServer is finished the bussines and only then to continue; but in the same time to repaint itself if necessary.If I ...

Oracle Stored Procedures & JDBC Thin Drivers & Multiple Result sets

879 byte By ganeshcd at 2007-9-26 10:16:19
Hi All,I am having Oracle 8.1.6 Server and am using JDBC Thin driver 8.1.6 (classes12.zip) to connect.I am able to return resultset from SP.(they return a ref cursor type in the SP).I am interested in returning multiple resultsets from the SP and using thin driver it is saying "Io exception: ...

VisualAge problem

532 byte By DeepForest at 2007-9-26 10:16:36
This is my code:try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); System.out.println("1"); String url = "jdbc:odbc:SCOTT"; java.sql.Connection con = java.sql.DriverManager.getConnection(url, "SCOTT", "TIGER"); System.out.println("2");}catch(Exception e) { System.out.println(e);}It works fine ...

SQLException: Stream has already been closed

1845 byte By tomecks at 2007-9-26 10:16:44
can you help me with this problem:we have Oracle tables:create table xx(a long raw);create table yy(a long raw);...and I have a static connection (initialized) to the user owning these tables. So my function:private static void dump() throws SQLException, IOxception{Statement stmt = ...

Clean Java Code No SQL

663 byte By donaghy at 2007-9-26 10:17:44
Has anyone concidered putting all SQL outside the java source code. A properties file seems rather limited so why not xml?My goal for posting this topic is to have the JDBC community provide input and suggestions for the given scenario.A java app performs a certain task involving a DB the ...

Prepared Statement - addBatch() abstract method error

632 byte By kolagotla at 2007-9-26 10:18:19
I am trying to execute a batch of insertions into one single tablehere is the code snippet:PreparedStatementps = con.prepareStatement(INSERT_REFERRAL);for(int i=0; i<emailAdd.size(); ...

Probelm with JDBC Type 4 driver - remote connection

360 byte By ashaap at 2007-9-26 10:18:47
HiI m using freetds JDBC Type 4 driver. I am using this driver from an applet and connecting to SQL Server7.0. The applet runs fine from my machine, but when I try to access it from other peoples PC in the network it gives me an exception - Driver not found. I would appreciate if someone can ...

Cannot call a stored proc from Java Layer using JDBC.

3173 byte By chetan6 at 2007-9-26 10:19:05
I am using Netscape Application Server 4.0 I am trying to call a stored proc which has the following signature PROCEDURE load_alt_addr( acct_nbr_in IN VARCHAR2, addressLine1 IN OUT VARCHAR2, addressLine2 IN OUT VARCHAR2, city IN OUT VARCHAR2, country IN OUT VARCHAR2, state IN OUT VARCHAR2, ...

configuration file

281 byte By Henan at 2007-9-26 10:19:54
what I'm doing is to read some data and store the data into database, but the data type might not be regonized by SQL, so I need a configuration file to read the data first. The question is how to write a configuration file and load it?

How to get primary key from MS access database?

61 byte By andyfai at 2007-9-26 10:21:20
How to get primary key from MS access database?

JDBC, Oracle: access denied

501 byte By DeepForest at 2007-9-26 10:21:45
I can load Oracle driverClass.forName("oracle.jdbc.driver.OracleDriver");But in this string:String url = "jdbc:oracle:thin:@195.52.61.6:1521:ORCL";java.sql.Connection con = java.sql.DriverManager.getConnection(url, "SCOTT", "TIGER");happens exception:java.security.AccessControlException: access ...

Passing table as (IN) parameter of an Oracle StoredProcedure

647 byte By ndeloof at 2007-9-26 10:21:58
Hello,I want to call an oracle 8.1.7 stored procedure define as:CREATE TYPE Commande as object(Name varchar2(64), Type varchar2(2))CREATE TYPE CommandeList as table of CommandeRapportPROCEDURE Enregistrer (pListe IN CommandeList)I can't use oracle.jdbc.driver.OracleCallableStatementbecause ...

Callable Statement

694 byte By kirandoshi at 2007-9-26 10:22:01
I have written a stored procedure in MS SQL, which works fine through the query analyserthe name of the stored procedure is "pers"In my java program, I have loaded the driver ...thenthe code is as followsConnection con;String query = "execute pers";CallableStatement call=con.prepareCall( ...

Container-managed transactions in Session EJB

2472 byte By vikaslamba at 2007-9-26 10:22:19
Hi allI've already posted this question in the EJB forum.. Don't know if this is the right place to post it again...I have a stateless session EJB deployed on Weblogic 6.0 on a UNIX server. I am using the Weblogic jDriver for connecting to MS SQL Server database. My problem is that I can't ...

How Do I Call PL/SQL Stored Procedure That Returns String Array?

473 byte By tksulki at 2007-9-26 10:22:23
I Have Problem Calling An Oracle(8i) Stored Procedure That Returns Array Type (Multi Rows)(As Good As String Array Type..)In This Fourm, I Can't Find Out Example Source.(Question is Exist.. But No Answer..)I Want An Example,, Because I'm A Beginner...(I Wonder...)If It Is Impossible, Please ...

move resultset's cursor to last position

221 byte By rossifumi80 at 2007-9-26 10:23:02
Hi, i want to say, if it is possible, what can i do to move the curser of resultset before the last position, because i want to read che last record.Thanks and excuse me for my english.Daniele.

JDBC, Float and UDB Stored Procedure

2150 byte By ken0624700 at 2007-9-26 10:23:17
I have a stored procedure with input and output parameters. Things are working fine except I can't seem to retrieve a float from my stored proc. The driver (COM.ibm.db2.jdbc.app.DB2Driver) constantly complains about class casting errors from double to float. Following is the stored proc:create ...

Next/previous links? Duke dollars...

231 byte By hyrum14 at 2007-9-26 10:23:46
I am offering Duke Dollars for help in creating next/previous links here: http://forum.java.sun.com/thread.jsp?forum=45&thread=183010I was told that I should ask here as there may be more help here...

No. Of Rows in a resultset

228 byte By ReddyMan222 at 2007-9-26 10:23:51
Is there a method in result which one could use to get the no. of rows in a resultset. I currently get my no. by looping thru the resultset and summing the number of times the loop runs.Cheers,Havasen

Table locking in MS SQL Server

391 byte By davehavard at 2007-9-26 10:24:11
HiCan anyone help with a locking problem I have. I have a jsp accessing an MS SQL 7 table. The data access has exception handling and the connection and resultset are closed within the finally block, however the table accessed sometimes gets locked preventing any updates to the records. I am ...

Checking for update.

345 byte By sudhinM at 2007-9-26 10:24:20
Currently I am doing a timestamp check before updating a table to verify that no one else has updated the table between the time I got the data on a screen and I am ready to update the table by hitting submit button. Is there a better way I can achieve this?I am using JDBC 2.0 and UDB database ...

JDBC for SQL Server

76 byte By padaek at 2007-9-26 10:25:05
Has anyone had success using the driver provided by Microsoft?

Inserting a Blob using JDBC 3.0/JDK1.4

472 byte By dviswana at 2007-9-26 10:26:28
Hi,I am looking for sample JDBC3.0 code to insert a brand new Blob into a table that contains a String "id" column and a Blob "data" column. I understand that I have to select the Blob out, get its outputstream and write to it. But how does it get into the DB in the first place?Any sample code ...

Can anyone tell me if this is correct ?

383 byte By footprint at 2007-9-26 10:27:56
Can anyone tell me if this is correct ?String query = "SELECT * FROM " + tablename + " where RECP_MOBILE = '" + mobile + "'" + "and USER_ID = '" + id + "'" ;( mobile and id are values from another place )I tried to execute this, but as long as the user_id is right, it will return me the ...

sun certification

162 byte By chandu2000 at 2007-9-26 10:28:58
I want to get the sun certification plz can u guide me how to prepare and get the information & how to prepare it and which sites i shd surf....

Connecting to MS SQL Server on UNIX/LINUX

235 byte By seralex at 2007-9-26 10:29:20
Hello friends,Is there a driver available to connect to MS SQL Server from a java application or servlet running on UNIX or Linux box? Is there a way to create ODBC connection to it on UNIX?Thank you!

How to fetch data with formating?

566 byte By vandanaj at 2007-9-26 10:29:37
Hi,I have a problem with extracting data from database. I am inserting data in mysql database through php and there is a field of text type in which data is inserted through a html textarea field with some newline or tab charecters. When I retrieve data from java using jdbc, all such characters ...

Database Connection

506 byte By jordan20 at 2007-9-26 10:29:43
Hello,I made a project using VisualAge for Java 3.5 and the I export to a directory. The problem is that if I run the application outside VisualAge, on another pc where I install JVM, Centura Database and JDBC I receive an error message that tell me "can't create a database connection Reason: ...

Please HELP ME !!!

511 byte By jordan20 at 2007-9-26 10:30:01
Hello,I made a project using VisualAge for Java 3.5 and the I export to a directory. The problem is that if I run the application outside VisualAge, on another pc where I install JVM, Centura Database and JDBC I receive an error message "can't create a database connection Reason: ...

Storing data in a db

698 byte By giorginobello at 2007-9-26 10:31:03
I'm developing an application that queries a db, shows the results in a JTable and then stores back into the db the data with all the new informations written into the JTable. Now, I've got no problem querying the db and showing the results into the Jtable, but I have to send back the infos ...

Urgent: English sort orders

439 byte By shrink_laureate at 2007-9-26 10:31:41
(yes, i posted this in another group as well. i'm desperate, ok?)I have SQL database in which one table is sorted using english sorting (EN_US, EN_UK, whatever) rather than dumb ASCII sorting.For reasons that would take far too long to explain, i need to duplicate that sort procedure in a Java ...

ResultSet

617 byte By rossifumi80 at 2007-9-26 10:31:49
Hi.I use visual age for java 3.5.I have a problem with class resultset.this is my code:try{Connection Cn = ........Statement Stm = Cn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);ResultSet Rs = Stm.executeQuery(".....");........}catch (....){.....}I receive this ...

From CSV To Oracle using JDBC.

256 byte By khiz_eng at 2007-9-26 10:31:53
Hi to all,Can anybody assist me how to proceed to read value from notepad or any (in the form of CSV) and transfer this value to Oracle using JDBC.Please do provide me as soon as possible.Thanks in advance.khiz_eng

null return on ResultSet

791 byte By NewtUK at 2007-9-26 10:32:06
I am using the following code to locate and navigate my way through a ResultSet. The first check !isBeforeFirst(), is carried out successfully. However, the subsequent test on isAfterLast() returns a null exception. I have tested that the ResultSet is not null (which it isn't), and cannot ...

MS Access without ODBC?

96 byte By joeyqyuan at 2007-9-26 10:32:08
Novice's question:Without jdbc-odbc bridge how can I use Access remotely? Thanks!

How to handle a column with data type of text and value of null?

250 byte By gyuan at 2007-9-26 10:32:21
In my ResultSet, there is a column which is text data type and is allowed null value. When I retrieve the value from that column using rs.getString() method, I get the error. Does someone have any idea to do it?Thanks previously.

No Suitable Driver Error with Centura SQLBase

1415 byte By scottarmand at 2007-9-26 10:33:14
Good morning,Can someone help me get this to run? When I run the CreateCoffees java tutorial I get the following:C:\jdk1.3.1\bin>java CreateCoffeesClassNotFoundException: centura.java.sqlbase.SqlbaseDriverSQLException: No suitable driverI have the SqlbaseDriver on my d:\Centura\java\sqlbase ...

raiserror from SQL Server 7.0 to Java

672 byte By tshawver at 2007-9-26 10:34:07
I am using JDK1.3.1 and SQL Server 7.0. I have written a stored proc in SQL Server that makes a check and calls raiserror if the check is violated. Example below:raiserror('Error msg', 16, 1)I have also tried using the SQL Server internal messages like so:raiserror(18113, 16, 1) or ...

Java 1.3/Oracle 8.0.6

66 byte By mvalk at 2007-9-26 10:34:28
Are there any drivers for Java 1.3 and Oracle 8.0.6?

MS SQL 2000 JDBC driver

120 byte By dseed62 at 2007-9-26 10:34:31
A beta JDBC driver has been released for MS SQL 2000. http://www.microsoft.com/SQL/downloads/2000/jdbc.asp

Invalid argument(s) in call: setRowBufferAt -- HELP

924 byte By S777 at 2007-9-26 10:34:34
I have an updatable resultset.I have been successful in doing updates / deletes and inserts into the resultset.I do this simply by using the resultset.updateXXX( ) and many other methods the API offers.But it starts to fallover when I run a query and the resultset brings back NO rows.As long as ...

Is there a simple way to handle execution of stored procedures generically?

1161 byte By javaforum2 at 2007-9-26 10:34:39
I need to write a generic method to execute the stored procedures. Ideally the method will have signature as follows: It takes a parameter of string which contains the name of the stored procedure and the input parameters (assume only input for now), execute and return true if successful.public ...

Is there a simple way to handle execution of stored procedures generically?

1161 byte By javaforum2 at 2007-9-26 10:34:40
I need to write a generic method to execute the stored procedures. Ideally the method will have signature as follows: It takes a parameter of string which contains the name of the stored procedure and the input parameters (assume only input for now), execute and return true if successful.public ...