Update problems with jdbc on access db too
hi..
i have a strange problem with updating a record in ms-access - db by using jdbc.
my program creates a "correct??" update-statement but i get an error-message: errorcode:3144.. syntaxerror in update-statement or something like that..
thats the statement that my program creates:
update maX2 set m1='super',set m2='hallo' where id=2
java-code:
Statement stmt = con.createStatement();
stmt.executeUpdate(... the update-statement ...);
does anybody know why i get this errormessage?
Your statemente should be:
update maX2 set m1='super', m2='hallo' where id=2
HTH
Similar Messages
-
updated to the new os x mavericks, now i'm having problems with my keychain access...everytime i asked to log in but when i do, it says can't find login items even if i reset it. what should i do?
Did you install the latest driver set for the device? there is a new release on motu.com for mavericks.
rachel -
I have a problem with JDBC Realm in Tomcat/Oracle/Win XP
I have a problem with JDBC Realm in Tomcat.
I have attached my server.xml file located in the
C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml
The Problem is that when I login I get the user name and password prompt but it does not resolve.
When I enter in the tomcat-users.xml password with memory realm uncommented it works fine.
C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml
Is there a cache or something I need to reset for the JDBC Realm to work?
I have attached my tables and contents as well...
Did I miss something????
Thanks
Phil
server.xml
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
</GlobalNamingResources>
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector
port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<!--
<Realm className="org.apache.catalina.realm.MemoryRealm" />
-->
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@localhost:1521:orcl"
connectionName="testName" connectionPassword="testPass"
userTable="users"
userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles"
roleNameCol="role_name" />
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
</Engine>
</Service>
</Server>
Tables
create table users
user_name varchar(15) not null primary key,
user_pass varchar(15) not null
create table roles
role_name varchar(15) not null primary key
create table user_roles
user_name varchar(15) not null,
role_name varchar(15) not null,
primary key( user_name, role_name )
select * from users;
----------------------+
| user_name | user_pass |
----------------------+
| tomcat | tomcat |
| user1 | tomcat |
| user2 | tomcat |
| user3 | tomcat |
----------------------+
select * from roles;
| role_name |
| tomcat |
| role1 |
select * from user_roles;
-----------------------+
| role_name | user_name |
-----------------------+
| tomcat | user1 |
| role1 | user2 |
| tomcat | tomcat |
| role1 | tomcat |
-----------------------+Jan 2, 2008 11:49:35 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 2, 2008 11:49:35 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 734 ms
Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
Jan 2, 2008 11:49:35 AM org.apache.catalina.realm.JDBCRealm start
SEVERE: Exception opening database connection
java.sql.SQLException: oracle.jdbc.driver.OracleDriver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:684)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:758)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1004)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jan 2, 2008 11:49:36 AM org.apache.catalina.core.StandardContext resourcesStart -
I have a tesco router and an external hard drive attached to it as a network drive (shared) for my macbook and MB-Air. Have no problems with my MB accessing it, but with MB-AIR it says - 'the version of the server you are trying to connect to is not supported. pls contact your system administrator to resolve the problem'. MB-Air uses maverick downloaded yesterday - upgrade from mountain lion. MB uses snow leopard still, as i am quite used to it and am thinking of upgrade if mavericks work fine on air. Also have parallel on snow leopard but it is no longer supported according to mac website - if i upgrade am i going to lose my parallel and will have to buy a new one!!!
Yes, the Old Master file has a folder for each year where I find all photos from that specific year. I am attaching a screen shot of the file.
In the meantime i have managed to download all photos (it did not download any video files though in mpg, avi, 3gp, m4v,mp4 and mov format) to a new iphoto library. Unfortunately the photos are quite mixed and often doubled up. I ma considering to purchase iphoto library which checks all duplicates in iphoto. this will save me a lot of time. What do you think? -
A problem with a session Access
Hi Olivier,
To connect with Forte while running distributed you must use System DNS
instead of User DNS on the server. The ftexec.exe on your server partition
will be launched by the NodeMgr running as UID SYSTEM. User DNS are not
available to processes running as UID SYSTEM.
Zenon Adamek
Purolator
-----Original Message-----
From: Olivier Andrieux [SMTP:oandrieuxaxialog.fr]
Sent: Tuesday, July 04, 2000 4:59 AM
To: forte-userslists.xpedior.com
Subject: (forte-users) A problem with a session Access
Hi,
We have defined a service object which calls a database Access, when we
use the driver odbc of another station the service object is created and
the application runs. But when we use the driver of the server we have an
exception and this message :
SYSTEM ERROR: Unable to start the partition AxiGecom_CL0_Part1 on any of
the
nodes to which it has been assigned. See the remainder of the error
stack for
more information.
Class: qqsp_ResourceException
Error #: [1602, 593]
Detected at: qqcf_StandardConfig::LoadRemotePartition at 5
Last TOOL statement: method InterfaceManager.PrepareLOM
Error Time: Tue Jul 04 10:50:19
Exception occurred (locally) on partition "Forte_cl0_Client",
(partitionId
= EB3ED870-274C-11D4-8051-304F7116AA77:0x3f9:0x2, taskId =
[EB3ED870-274C-11D4-8051-304F7116AA77:0x3f9:0x2.15]) in application
"FTLaunch_cl0", pid 149 on node STAT10 in environment axialog.
SYSTEM ERROR: Unable to start partition AxiGecom_CL0_Part1 on node
SERVEUR59B.
Class: qqsp_ErrorDescriptor
Error #: [1602, 592]
Detected at: qqcf_StandardConfig::LoadRemotePartition at 3
Error Time: Tue Jul 04 10:50:19
Exception occurred (locally) on partition "Forte_cl0_Client",
(partitionId
= EB3ED870-274C-11D4-8051-304F7116AA77:0x3f9:0x2, taskId =
[EB3ED870-274C-11D4-8051-304F7116AA77:0x3f9:0x2.15]) in application
"FTLaunch_cl0", pid 149 on node STAT10 in environment axialog.
SYSTEM ERROR: Attempt to load partition named AxiGecom_CL0_Part1 failed.
Class: qqsp_ResourceException
Error #: [1001, 4]
Detected at: qqrt_ForteExecAgent::LoadPartition at 1
Error Time: Tue Jul 04 10:49:15
Distributed method called: qqrt_ForteExecAgentProxy.LoadPartition!6
(object name Unnamed) from partition "Forte_cl0_Client",
(partitionId =
EB3ED870-274C-11D4-8051-304F7116AA77:0x3f9:0x2, taskId =
[EB3ED870-274C-11D4-8051-304F7116AA77:0x3f9.4]) in application
"FTLaunch_cl0", pid 149 on node STAT10 in environment axialog
Exception occurred (remotely) on partition "Forte_Executor",
(partitionId
= EB3ED870-274C-11D4-8051-304F7116AA77:0x3de, taskId =
[EB3ED870-274C-11D4-8051-304F7116AA77:0x3de.61]) in application
"AxiGecom_cl0", pid 386 on node SERVEUR59B in environment axialog.
SYSTEM ERROR: Failed to create service object
Axigecom_Serveur.Connection_BD.
Class: qqsp_ResourceException
Last TOOL statement: method qqsp_NameList.
Error Time: Tue Jul 04 10:49:15
Exception occurred (remotely) on partition "Forte_Executor",
(partitionId
= EB3ED870-274C-11D4-8051-304F7116AA77:0x3de, taskId =
[EB3ED870-274C-11D4-8051-304F7116AA77:0x3de.61]) in application
"AxiGecom_cl0", pid 386 on node SERVEUR59B in environment axialog.
USER ERROR: (This error was converted)
Failed to connect to database: Axigecom, username: Administrateur.
[Microsoft][Gestionnaire de pilotes ODBC] Source de données non
trouvée et
nom
de pilote non spécifié
Class: qqdb_RemoteAccessException with ReasonCode:
DB_ER_DBMSCONNECTION
DBMS SQLSTATE: IM002
Class: qqsp_ErrorDescriptor
Detected at: qqdb_OdbcVendorInfo::DoSQLConnect at 10
Last TOOL statement: method qqsp_NameList.
Error Time: Tue Jul 04 10:49:15
Exception occurred (remotely) on partition "Forte_Executor",
(partitionId
= EB3ED870-274C-11D4-8051-304F7116AA77:0x3de, taskId =
[EB3ED870-274C-11D4-8051-304F7116AA77:0x3de.61]) in application
"AxiGecom_cl0", pid 386 on node SERVEUR59B in environment axialog.
for information, we use a server NT and the stations use Nt, the drivers
DNS users are declared.
We use Access2000, and the version M for Forté
Thanks in advance,
Olivier Andrieux
AXIALOG
France -
i have a problem with my mac i have too many archives and programs and i want to delete all files and start at the begin my mac with out do format
I do not recommend reformatting your harddrive and reloading your software. This is a Windows thing. On an older mac it may be difficult to find all your software again.
Best to have greater than 2gig of free space. Many posters to these forums state that you need much more free space: 5 gig to 10 gig or 10 percent of you hd size.
(0)
Be careful when deleting files. A lot of people have trashed their system when deleting things. Place things in trash. Reboot & run your applications. Empty trash.
Go after large files that you have created & know what they are. Do not delete small files that are in a folder you do not know what the folder is for. Anything that is less than a megabyte is a small file these days.
(1)
Run
OmniDiskSweeper
"The simple, fast way to save disk space"
OmniDiskSweeper is now free!
http://www.omnigroup.com/applications/omnidisksweeper/download/
This will give you a list of files and folders sorted by size. Go after things you know that are big.
(2)
These pages have some hints on freeing up space:
http://thexlab.com/faqs/freeingspace.html
http://www.macmaps.com/diskfull.html
(3)
Buy an external firewire harddrive.
For a PPC computer, I recommend a firewire drive.
Has everything interface:
FireWire 800/400 + USB2, + eSATA 'Quad Interface'
save a little money interface:
FireWire 400 + USB 2.0
This web page lists both external harddrive types. You may need to scroll to the right to see both.
http://eshop.macsales.com/shop/firewire/1394/USB/EliteAL/eSATA_FW800_FW400_USB
(4)
Buy a flash card. -
Im trying to update, but all it does is backup my phone, My itunes is updated, BTW, I just went to Apple bar, i had previous problem with prior phone, now im having this update problem with thyis new phone, someone HELP!!
Same here and this is driving me crazy. I can buy, but can't upgrade. Grrr.
-
HELLO
I was playing candy crush and I had too much problem with my bill your charge too much I want to know what is the problem with this game costTake it up with iTunes Support - we are not Apple here, we are just users like you:
http://www.apple.com/support/itunes/ww/
Cheers,
GB -
$200 reward to solve problem with JDBC and CLOB.getCharacterOutputStream
I'm trying to update CLOB with the getCharacterOutputStream as suggested in the example code. It works with US7ASCII DB instance but not instances in UTF8.
I've been browsing through all the Oracle doc's and found some rather confusing statements:
In the page at http://oradoc.photo.net/ora816/java.816/a81354/oralob2.htm#1043220
it says: [When writing to or reading from a CLOB, the JDBC drivers perform all character set conversions for you.]
also: [The oracle.sql.CLOB class supports all the character sets that the Oracle data server supports for CLOB types.]
So far so good.
In the page at http://oradoc.photo.net/ora816/java.816/a81354/oraint3.htm#1012518
it says [The oracle.sql package supports these datatypes in several ways: CLOBs point to large fixed-width character data items (that is, characters that require a fixed number of bytes per character) and are supported by the oracle.sql.CLOB class.]
Ooh no! Is this for real? UTF8 is variable width and does this mean it is not supported?
Any way to get around this?
In the page at http://oradoc.photo.net/ora816/java.816/a81358/03_pub2.htm#36009
says [6.The mappings to oracle.sql classes are optimal because they preserve data formats and require no character-set conversions (apart from the usual network conversions). Those classes are especially useful in applications that "shovel" data between SQL and Java.]
"No character set conversion"? Very confusing!
I've been hammering on this CLOB/JDBC/UTF8 problem for more than a week now and I really appreciate some solutions, workarounds, or whatever help I can get. I'm running java stored procedure in 8.1.6 on Linux RH6.2.
For your trouble, I'd pay $200 for the first guy who come up with a verifiable solution.This is just findings based upon your comments:
Please refer to document Oracle8i National Language Support Guide
Release 2 (8.1.6) from Oracle Documentation Library, Release 8.1.7
Chapter 6 Java,
There its clearly mention that:
"Oracle JDBC drivers provide globalization support by allowing users to retrieve data from or insert data into a database in any character set that Oracle supports. Because Java strings are UCS2 encoded (16-bit Unicode) for JDBC programs, the target character set on the client is always UCS2. Character set conversion is required to convert data from the database character set (Db Charset) to UCS2. This applies to CHAR, LONG, CLOB, and VARCHAR2 data types; RAW data is not converted. "
Also..please refer this...
"oracle.sql.CLOB's method getCharacterStream() returns the contents of a CLOB as a Unicode stream."
"The techniques that Oracle's drivers use to perform character set conversion for Java applications depend on the character set the database uses. The simplest case is where the database uses a US7ASCII or WE8ISO8859P1 character set. In this case, the driver converts the data directly from the database character set to UCS2,which is used in Java applications. "
"If you are working with databases that employ a non-US7ASCII or non-WE8ISO8859P1 character set (for example, Japanese or Korean), then the driver converts the data, first to UTF8, then to UCS2. "
In my case the characte-set of the database is WE8ISO8859P1 and for security reason i can't change the character set but my feeling is that if you are updating the CLob from the java client you are forming a reference of a clob in the client which is UCS2 at the Java side. Now when you are populating the clob through java.io.Writer and call the procedure to pass the reference of the clob to the procedure then I believe the JDBC will convert the UCS2 datatype of Clob to UTF8 in the database.
You can try out the code snippet:
package ServletGDC;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import oracle.sql.*;
import java.sql.*;
import oracle.jdbc.driver.*;
import ClassesGDC.*;
public class testUpload extends HttpServlet {
private String m_strMessage="";//It stores the message to be uploaded along with the Document
Connection conn=null;
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
String strContent="";
//res.setContentType("application/msword");
res.setContentType("text/html");
PrintWriter out = res.getWriter();
try {
CallableStatement cmt=null;
OutputStream output=null;
ByteArrayOutputStream byteoutput=null;
String strDocString="";
oracle.sql.CLOB tempClob = null;
String strPassedFileName=""; // the file name passed in the request object
String strStdFilename="";//the file name to be given to the best practice
String strSaveDirectory=""; //the directory in which the bp is to be saved
String strParamName="";//name of parameters
String strParamValue="";//value of parameters
int intTempVariable=0; // temporaty variable
long lngSizeOfFileUploaded=0;//stores the size of the file which had been uploaded in the file system
File filePathOfFileUploaded=null;//stores the path of the file uploaded to the file system
String strQuery="";
//ST------------checks if the user has logged in or not-----------------------
HttpSession session=req.getSession(true);
if(req.getContentLength()>20*1024*1024)
throw new skip("The size of the posted content is more than 10 MB . If you have a best practice whose size is more than 1 MB please mail it to Us.");
byteoutput = new ByteArrayOutputStream();
MultipartParser mp = new MultipartParser(req, 20*1024*1024); // 10MB is the limit of the file to be uploaded
Part part;//Its an abstact part which helps in retrieving information about the file and the parameters
while ((part = mp.readNextPart()) != null) {//Reads the next part
strParamName = part.getName();
// the following if is executed if the part is for a parameter rather than a file
if (part.isParam()) {
}else if (part.isFile()) {
// it's a file part
m_strMessage="inside file part";
FilePart filePart = (FilePart) part;
strPassedFileName = filePart.getFileName();
strContent= filePart.getContentType();
out.println("<BR><font color=red>strPassedFileName is "+strPassedFileName+"</font>");
if(strPassedFileName != null || !(strPassedFileName.trim().equals("")) ) {
// the part actually contained a file
out.println("<BR><font color=red> before forming long</font>");
//lngSizeOfFileUploaded = filePart.writeTo(filePathOfFileUploaded); //the statement upload the bestpractice in the
lngSizeOfFileUploaded = filePart.writeTo(byteoutput); //specified file path filePathOfFileUploaded.
out.println("<BR><font color=red> after file is written into the outputstream</font>");
else {
throw new skip("The file name is null or it is empty space. Files in such Format are not accepted");
}//end of else if
}//end of while loop
if( lngSizeOfFileUploaded==0) {// the size of the file uploaded is zero then the file supplied was not proper and hence exception is to be thrown
//if(filePathOfFileUploaded.exists())
// filePathOfFileUploaded.delete();
throw new skip("The File could not be uploaded,Possible reasons may be that the file is sent null or the file is corrupted");
//END---------------the file is uploaded in the proper directory--------------------
//res.setContentType(strContent);
out.println("<BR><font color=red>long value is : "+lngSizeOfFileUploaded+" and content is "+strContent+"</font>");
String strbyte= byteoutput.toString();
byteoutput.flush();
Class.forName("oracle.jdbc.driver.OracleDriver");
// Establish network connection to database
conn = DriverManager.getConnection("jdbc:oracle:thin:@pc-p32670:1521:GDCDBI","gdc_user","myuser");
//if(conn!=null)
out.println("<BR><font color=red>Connection formed"+conn);
//els
//out.println("<BR><font color=red>long value is : "+strbyte+"</font>");
try{
tempClob = oracle.sql.CLOB.createTemporary(conn,true, oracle.sql.CLOB.DURATION_SESSION);
out.println("<BR><font color=red>tempClob : "+tempClob);
tempClob.open( oracle.sql.CLOB.MODE_READWRITE);
java.io.Writer tempClobWriter = tempClob.getCharacterOutputStream();
// writing the string formed from the multipart file to the clob
tempClobWriter.write(strbyte);
if(tempClob!=null){}
out.println("<BR><font color=red>CLOB value is : "+tempClob+"</font>");
strQuery="{call INSERT_CLOB(?,?)}";
cmt=conn.prepareCall(strQuery);
cmt.setString(1,strPassedFileName);
cmt.setClob(2,tempClob);
cmt.registerOutParameter(2,java.sql.Types.CLOB);
cmt.execute();
tempClobWriter.flush();
tempClobWriter.close();
tempClob.freeTemporary();
//res.setContentType(strContent);
//strDocString.toString();
out.println("<BR><font color=red>bob is "+strbyte+"</font>");
tempClob.close();
}catch(Exception e){
tempClob.close();
out.println("<font color=blue> Error is :"+e.getMessage()+"</font>");
//e.printStackTrace(out);
cmt.close();
//out.println("<BR><font color=red><h2><b>SUCCESS</h2></font>");
//res.sendRedirect("../test/showfile.jsp?contentype="+strContent.trim()+"");
}catch(Exception e){
java.util.Date d = new java.util.Date();
String s =d.toString();
out.println("<font color=blue> Error is :"+e.getMessage()+"</font>");
//e.printStackTrace(out);
}finally{
try{
if(conn!=null)
conn.close();
}catch(Exception e){
out.println("<font color=blue> Error is :"+e.getMessage()+"</font>");
}// end of finally
} //end of doPost
} //end of class
in the Procedure you will be inserting/updating the clob in a table with the reference clob in the out parameter of the procedure
Thanks. -
Update problems with itunes 10.6.1 on xp
When I try to update to iTunes 10.6.1 n Windows XP sp3 I get the dialog box to repair or remove. If I select repair the update fails. Any ideas on how to correct this issue?
I have an old macbook too.
It seems like Apple writes new software that makes older computers not work as well.
I always have reservations about updating with an older model.
Does anybody else have any problems with the new iTunes?
Model Name: MacBook
Model Identifier: MacBook4,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 3 MB
Memory: 2 GB
Bus Speed: 800 MHz
Boot ROM Version: MB41.00C1.B00
SMC Version (system): 1.31f1
Serial Number (system):
Hardware UUID:
Sudden Motion Sensor:
State: Enabled -
Adobe Flashplayer 12 creates problem with Kaltura setting access
After installing Flashplayer 12 I have the following screen: problem with Kaltura 'can't access settings'
(Have screen shot but cannot paste it here ...)
<pre><nowiki>
Looks like:
Captions Settings
FONT SIZE
Stroke ON
Background OFF
SAVE CANCEL
******************</nowiki></pre>
The video plays, albeit with this window in the middle of the image. Just happened after last update.Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
*Do NOT click the Reset button on the Safe Mode start window.
*https://support.mozilla.org/kb/Safe+Mode
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
Clear the cache and cookies only from websites that cause problems.
"Clear the Cache":
*Firefox > Preferences > Advanced > Network > Cached Web Content: "Clear Now"
"Remove Cookies" from sites causing problems:
*Firefox > Preferences > Privacy > Cookies: "Show Cookies" -
Hi, sorry but in other forum nobody answer my question.
the probles is using JDBC 2.0, my cod is:
Statement c = conn.createStatement();
Statement =conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
ResultSet rest = n.executeQuery("select * from t_prueba");
rest.last();
rest.updateBlob("C", null);
rest.updateRow();
rest.close();c.close();conn.close();
at time to execute this code, i have this error:
java.sql.SQLException: Operaci�n no v�lida para el juego de resultados de s�lo lectura: updateBlob
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)
at oracle.jdbc.driver.BaseResultSet.updateBlob(BaseResultSet.java:482)
at oracle.jdbc.driver.OracleResultSet.updateBlob(OracleResultSet.java:1230)
at mypackage3.Conversor.leerImagenBase64(Conversor.java:51)
at mypackage3.Conversor.main(Conversor.java:77)
why is this problem if i using ResultSet.CONCUR_UPDATABLE in my statement.
i 'm using jdeveloper 10.1.2 whith j2se 1.4.2_04
please anyone can help me please
tanks
alexThere are numerous problems with what you posted.
1) Do you mean to use updateNull and not what you are doing?
2) As mentioned why would you not do this in an UPDATE query? Even if you get this to work arbitrary moving around in a result set that you don't even need along with bad practices like SELECT * is just bad all around.
3) Further as mentioned what you are trying to do is not supported (obviously) by your driver/database etc. Just because you ASK for a scrollable updatable cursor does not mean that you get one. You ask for one but obviously that error message says that the cursor is read only. For the benefits of others it says (more or less) "invalid operation on read only result set : updateBlob"
Possibly you will have to use a forward only cursor to make it updateable... I don't know consult the Oracle docs. Or better yet don't do it this way. -
Hi,
I am using mysql with JDBC , and I try to execute a update like this:
update tablename set doc="function test(){ var test; test=1;return test;}" where DocId='11';
It is work well in mysql console. But when i run it in program use JDBC, the result in database field Doc in row where DocId='11' is :
function test() var test; test=1; return test; {}
I didn't know who change the "{ " location ?
How to solve this problem?Hi,
Maybe the driver thinks it's some kind of escape
sequence, but I still don't see why this happens. Just
an idea, maybe it helps.
Alin.Mr Ace169,
Thank you for your reply. I also think that { must a escape sequence . Could you tell me where can i find the escape sequence for JDBC of mysql? -
Problem with JDBC Connection for HDB hanadb 02
Hi folks,
Ok I have an instance based on the 7.4 SP5 HANA CAL solution.
But when I suspend and restart the R3 system doesn't start again.
I've followed the instructions in the user guide and can access the backend instance and see that for HDB GetProcessList everything is GREEN, running
while for A4H GetProcessList everything is GREY, stopped
When I try to start the A4H instance I get
Checking HDB database
Database is not available via R3trans
Database must be started first
The messages I found on SCN suggested this might be a license problem with the HANA database, so I tried to follow the install license instructions for the HANA database via the HANA studio, but when I try to open the HDB(SYSTEM) > Properties > Licence, I then get the messages
Error while reading the licence information from system HDB hanadb 02
Reason:
Cannot retrieve JDBC Connection for HDB hanadb 02
So what do I try now?
Any suggestions?
Rgds,
JocelynThanks Ivanka! That sorted it.
For the benefit of others...the error message was found in the server log files
/var/log/applianceagent.log
/var/log/appliancedeploy.log -
I don't know where the problem originate, the only thing in my memory is that the program worked very well on my PC yesterday, but today, without even slightest change, it doesn't work anymore. As to debug it, I simplified the codes to the least, but it still refuse to work. I was beaten down by this problem totally, and cannot make out any solution for it, so, I come here, hoping to find a warrior to kill this damned bug for me.
My program is a Servlet, but for the purpose of debugging, I have recode it to an Application/Servlet. When run as a application, I can get the result expected, but as a Servlet, :-(, maybe you should see it by yourself. My server software is Tomcat 4.1.15, and the JDK version is 1.4.0. To excute this program, you should add Data Source "Test" to ODBC.
///////////////////////code begins/////////////////////////
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class Ex extends HttpServlet
int ErrorType = 0;
String err = new String("");
public static void main(String args[]) throws Exception{
Ex cEx = new Ex();
cEx.init();
System.out.println(cEx.ErrorType);
public void init() {
String url = "jdbc:odbc:Test";
ErrorType = 3; //passed
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
ErrorType = 1; //trapped in Class.forName
try{
Connection c = DriverManager.getConnection(url);
} catch (SQLException e) {
e.printStackTrace();
ErrorType = 2; //trapped in DriverManager.getConnection
err = e.getMessage();
public void service(HttpServletRequest req, HttpServletResponse res)
throws IOException {
res.setContentType("text/html; charset=GB2312");
PrintWriter out = res.getWriter();
out.println("Success " + "<p>" + ErrorType + "<p>" +err);
out.close();
//////////////////////////code ends///////////////////////////////
The result from the Servlet tell me that the problem occurred within the connection process, I don't know who should be responsible to this - Tomcat or JDBC?If you could print the exception that you got then that would help :) In the mean time, I could make a guess. It is unlikely that your application server (in this case, Tomcat) is blocking connections from your servlet. So the problem is either with JDBC directly or with the underlying datasource. It seems unlikely that it is JDBC given that you have stated that the code has not changed and it works in application form.
My guess would be that you are coming up against some sort of security constraint (eg: your DBMS is letting you log in from one IP but not another?, your Java plug-in security policy is disallowing the connection?). It's hard to say.
But if it works as an application but not via a servlet then you could try putting this in your java.policy file, which is located in the directory where your plug-ins are installed (eg: "C:\Program Files\Java\<version>\lib\security\") on Windows systems;
permission java.net.SocketPermission "bend xp:1099", "listen,connect,accept";
Try that, see if it works :)
Ben
Maybe you are looking for
-
Okay, so I updated a lot of my contacts on my MacBook Air. Now I want the newly updated contacts on my iPhone, really don't want to add all those emails and fax numbers on my iPhone that is why I used my laptop. Now I go to sync it with itunes and it
-
After I updated my iTunes to 11.1.1, it wouldn't open. I found something on these forums that had a link to an OS update to fix the problem. Downloading and installing the OS update took nearly 24 hours, and iTunes still won't open. Is there somet
-
Dialogue box won't close in pages
Help! I have a dialogue box frame that is stuck open in Pages. I have restarted Pages and also rebooted my MacBook Pro. When I relaunch Pages, the dialogue box frame still appears in front of (or on top of) any pages document I open. How do I make i
-
Release date of LMS 4.1?
What is the expected release date for LMS 4.1? -David
-
I am unable to access my yahoo account from my iPad or iPhone I have always been able to before but now it says my user name or password is incorrect and when I retype the details back in it won't verify them it gets timed out