3260 byte By
talon74 at 2007-9-26 1:13:40
I have posted another topic on the JSP forum. The link to the issue is http://forum.java.sun.com/thread.jsp?forum=45&thread=149894I have copied the code to help you look at it. I have a servlet which retreives the connection and resultset. I'm trying to return a Blob as a picture (jpeg) ...
238 byte By
Smoerble at 2007-9-26 1:13:58
hey all...anyone has a solution how to automaticly restart the tomcat-server (startup.bat= on a Win2000-machine ?(sorry, the server is not my idea ;)help would be fine ;)thanksmichael stock
504 byte By
sohailn at 2007-9-26 1:14:21
How can i use the PreparedStatement to send the array (It can be variable depend upon the user selection) of primary keys to database For example I want prepare statement somthing like thispublic Collection findByIds(long[] ids){String sql = "select * from Person where person_id IN ...
1279 byte By
Thejas at 2007-9-26 1:14:39
For the code below, I am getting different exceptions for different ResultSet types.ResultSet rs = stmt.executeQuery("Select * from usermaster");rs.absolute(3);rs.updateString("emailID", "newID");rs.updateRow();*****For ResultSet -> ResultSet.TYPE_SCROLL_INSENSITIVE, ...
I had given the parameter "{call test_procedure(?,?,?)}' for the CallableStatement. The 3rd '?' gives the OUT parameter. The stored procedure is supposed to insert some data to a particular table. Executing the program and freshly calling the procedure, no exception is thrown, the records ...
240 byte By
joey829 at 2007-9-26 1:15:53
Dear all,Does anyone know if it is neccessary to call the commit() or rollback() method or not, after i pass a select statement to a PreparedStatement object instead of a insert/update statement?Thanx.Joey
I was testing my applet and decided to make it do over a hundred simple queries one after the other just to see how it would cope. Ive noticed that after 120 queries the speed of the applet reduces significantly.What my program does is firstly connects to the MS Access database then for each ...
3579 byte By
cheekhye at 2007-9-26 1:16:19
HI,i am a student from Malaysiai am doing my JDBC project with my group members and i get the same problem as you all, that is === INVALID CURSOR STATE!!!!!!what is this about? some one can explain this? define this statement? my 3 files got this kind of problem and cause me cannot delete ...
1774 byte By
touco at 2007-9-26 1:17:30
Hello guys,I'm using PostgreSQL 7.0.3 for a website project.I've got a table in the website database system which has a integer array type,e.g.create table preferences(user_id integer references user,music varchar(20)[5],magazines varchar(20)[5],channel varchar(10)[3]) I've also got an ...
772 byte By
marikkan at 2007-9-26 1:17:39
Hi, I get the error in the subject when I use it with the following code in an applet.try {Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");connection = DriverManager.getConnection(url, username, password); }catch (Exception e) {e.printStackTrace();name.setText(e.toString());connection = ...
1844 byte By
awma at 2007-9-26 1:17:57
I have set up my data source name and it is present in the odbc.ini file in C:\windowsI compile and execute the sample code and the Jdbc-Odbc Bridge loads but then it tries to load the JdbcOdbc library and can't. Here is the output:DriverManager.getConnection("jdbc:odbc:Test")trying ...
146 byte By
skasaya at 2007-9-26 1:18:28
The access to SQLServer using JDBC is it very slow ?Somebody has a example to access SQLServer ? Please, Help me
I created a simple JDBC applet to connect to Oracle and select something from DB. When I used appletviewer, it said Exception occurred during_event dispatching:java.lang.NoClassDefFound Error" oracle/jdbc/driver/OracleDriverBut everything is working when I tranfered this JDBC connect to ...
We are passing custom Oracle datatypes (arrays) as parameters to stored procedures using JDBC. Everything is working fine, but we have about 12 custom Oracle data types, and each one takes just over 1/2 second to register (using ArrayDescriptor). This gives us about a 7 second hit for all of ...
202 byte By
sowmiya at 2007-9-26 1:20:57
Hi!,I am using JDBC prepared statement to insert a date into Oracle table. The format of the date is to be like 20-JUL-01 . But I am not able to do using java.sql.Date object. Please help!
398 byte By
plalitha at 2007-9-26 1:21:00
But when i pass from one servlet to other ,the second servlet is not recoginising the session and it is printing null.I used String uc=(String)session.getValue("Comp").This comp is from my html into first servlet,when it satisfies then it should pass to second .But the second servlet is ...
I have a servlet now working on an Windows platform using the ODBC-JDBC driver to connect to MSAccess databse. My web hosting provider is on Linux. Any suggestions on how this should work or can one even use a *.mdb file on Linux seeing there is no ODBC connection possible? What databases can I ...
I am attempting to insert a row into a table in an Oracle database via a connection with the JDBC Oracle thin driver, but when executeUpdate() is called with a valid INSERT statement, the program freezes! Here's my query...StringBuffer query = new StringBuffer("INSERT INTO ...
652 byte By
tedjop at 2007-9-26 1:21:38
This is my source code, I have created the DSN withOracle driver, but I have got no luck to connect toOracle database (mine is version 8):...Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");Connection DBCon = DriverManager.getConnection ("jdbc:odbc:customer", "scott", "tiger");Statement Stmt = ...
896 byte By
HaPe at 2007-9-26 1:22:33
Hi everyone!Since pstmt.setAsciiSream or setBinaryStream doesn't seem to work for data larger than 4k while using oracle:thin I inserted Blobs or Clobs usually in the following way:Clob myClob = (Clob)resultSet.getObject("text");java.io.Writer CLOBout = ...
124 byte By
msohaib at 2007-9-26 1:23:11
How can i manipulate - add, delete, update - JDBC Datasources from a java applcation or servlet?
616 byte By
mrVisual at 2007-9-26 1:25:10
Hi!I want to access to a DB via an applet.Should I use JDBC (with a 100%-pure-JAVA-Driver) to connect to this DB orshould I get the data from an server-side-application (for example a JSP), returning the data in a structured way (XML, CSV, ...)If I use JDBC, will the Applet connect to the ...
I use following code to create statement,I am using Microsoft Access DataBase 1:st= dbConnection.createStatement(); 2:st= dbConnection.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE );- rsAuthors = st.executeQuery("SELECTlastname,firstname,city,country FROM ...
how do you create a Scrollable ResultSet from a DatabaseMetaData?... A very simple question but I ended up in vain in searching the forum.
1201 byte By
brads at 2007-9-26 1:26:16
I'm getting an SQLException "No suitable driver" with MM.MySQL.I've read the MM.MySQL HTML docs and there is a section detailing that error but none of it helps.Meaning I've addressed:1. ClassPath settings2. "//" in url - various different ways3. Calling forInstance()I'm running jdk1.2.2 on ...
139 byte By
CYung at 2007-9-26 1:26:33
is it possible to have a database program running on a local machine and use it to update the database in the remote machine?
Hello viewers,I want to transfer the data from Excel file to oracle database ,for that purpose iam using EXCEL DRIVER, but it requires DSN for each work book.Myclient is unaware of creating the dsn.How can create the dsn dynamically.please solve this problem.Bye Ramesh ...
I'm trying to connect to Oracle using jdbc.this is the simple code for my program, I'm getting run time error"memeory couldn't be read".import java.sql.*;class MyCon{ public static final String JDBC_URL = new String("jdbc:oracle:oci8:@BhDb1onlocalhost"); public static final String USERNAME = ...
How does JDBC Connection work with multithreading clients accessing it? Can anybody refer me to any documentations out there?
559 byte By
mike_nu at 2007-9-26 1:34:08
Hi there,I am trying to get connection to a remote Oracle database using the following string: String url ="jdbc:oracle:oci7:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = devsvr)(PORT = 1521))(CONNECT_DATA = (SID = eu)))";String user= "user";String pswd = "user";Connection conn = ...
457 byte By
BrianB24 at 2007-9-26 1:34:28
I attempted to create a scrollable result set with the following create statement.s = c.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);I received the following error at runtime.java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]Driver not capableAnyone ...
Now I am working in win2000.jdk1.2.2 and oracle 8.1.6.My problem is when I use ****.main(new String[]) in servlet it has run time error. **** is a standalone application which invoke JDBC and it works.And I have set classpath to classes111.zip and classes12.zip. And I have set path to ...
Hi,How do we write a query in stored procedures if the field to be selected,conditions & sort order are dynamic?The user selected the columns,conditions & sort order only at run time.Thanks in advance,sundar
598 byte By
romit_k at 2007-9-26 1:37:05
I wanna check whether my Result set is empty or not ( I don't want the no of rows it contains..) i'm using this function...boolean result=myResultSet.isAfterLast() | myResultSet.isBeforeFirst() ;if (result == true){//Result Set is populated}else{//ResultSet Blank}Is it ok to do like this ? Or ...
1105 byte By
msnowdon at 2007-9-26 1:38:11
Hi,I am having trouble reading a timestamp field from sql server. Java 1.3/SQLServer 7 SP1, ODBC:JDBC bridgeWe can access other datatypes OK but get the error [Microsoft][ODBC SQL Server Driver]Restricted data type attribute violationwhen we try to read a timestamp or datetime value, using ...
124 byte By
atio at 2007-9-26 1:39:52
Under what circumstances does createStatement() return null ? and how can i prevent it from doing so ?
I have a MS SQL Server 2000 on Windows2000,For some speical reasons,I need to write a JAVAProgram running on Linux which can access datasin MS SQL Server....How do I code?
When I try to connect to the oracle database with the jdbc application the IOException - network adapter could not stablish the connection. How can I solve this problem and prevent from this Exception.
1008 byte By
pwaite1 at 2007-9-26 1:41:51
When using the getConnection method of a datasource set up on WAS 3.5 on S/390, I receive the following error: IBMConnMgrException: Failed to switch thread security context. In the getConnection method I include the userid and password for the Oracle database, which are different from ...
We are passing custom Oracle datatypes (in our case, arrays of basic types such as Varchar) as parameters to stored procedures using JDBC. Everything is working fine, but we have about 12 custom Oracle data types, and each one takes just over 1/2 second to register (using ArrayDescriptor). This ...
I have a column in one of my tables that requires me to give it a Timestamp value when the record is updated. How is it that I use Timestamp() and furthermore, how is it that I can then use toString() so that I can use it in my JDBC SQL statement?Could someone please give me some sample code ...
633 byte By
Charissa at 2007-9-26 1:43:20
Hi. I am very familiar with Oracle but very new to Java. I need some guidance as to where I should begin with the following requirement: I need to insert logs residing on an NT file system (generated by the application server) into BLOB columns in an Oracle database using Java (I think i/o is ...
I use:+ Interbase 5.0+ Interclient InterServer 1.6+ Java Web Server 2.0+ JDK 1.3 (with runtime enviroment)+ JBuilder 4I start JWS with httpdnojre and "-javahome" set to JDK 1.3 but so far without luck. When I set javahome to JDK 1.3, I cannot access any servlet whatsoever. In that case I get a ...
I'm trying to run the EJB tutorial: http://developer.java.sun.com/developer/onlineTraining/EJBIntro/which requires the use of Cloudscape.When I downloaded and installed j2sdkee1.2.1 it came with a version of Cloudscape that was installed underneath the J2EE_HOME directory. I was able to start ...
83 byte By
h_ghisad at 2007-9-26 1:46:52
Are JDBC methods are thread safe? If not how to make them thread safe
83 byte By
h_ghisad at 2007-9-26 1:46:53
Are JDBC methods are thread safe? If not how to make them thread safe
Hi All,I'm trying to use the CachedRowSet in my application, but when I compile the code the error message says:"sun.jdbc.rowset.CachedRowSet is an abstract class. It can't be instantiated". This is the code:CachedRowSet crset = new ...
i get an java.lang.UnsatisfiedLinkError exception executing on visual age for java, with db2 7.1 String url = "jdbc:db2:FDB";c = DriverManager.getConnection(url);Statement st = c.createStatement(); thanx in advance...
hi can i connect mssql server database(on webserver) from client using JdbcOdbcDriver.
757 byte By
breif1 at 2007-9-26 1:48:32
I am pretty new to both JTA and JCA, but I want to handle global transactions to multiple databases in my Java application. I am considering implementing either JTA or JCA to accomplish this. The JCA spec says it handles transaction management as well. If I implement JCA using a J2EE App ...