Java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few...
Can someone please help me? I get the error java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
The offending section of code is:
int resultsTableID = 0;
query = "SELECT results_table_01 FROM dbo_results_table_01 WHERE image_1_id = '" + file1ID + "' AND image_2_id = '" + file2ID + "'";
System.out.println(query);
rs = s.executeQuery(query);
The select statement comes out:
SELECT results_table_01 FROM dbo_results_table_01 WHERE image_1_id = '115' AND image_2_id = '116'
There does not seem to be a problem with the parameter separations, so if anyone can spot what I have done wrong I would appreciate it.
Thanks
I have just tried what you advised: Not using single quotes, and I got the same error.
The query now looks like:
query = "SELECT results_table_01 FROM dbo_results_table_01 WHERE image_1_id = " + file1ID + " AND image_2_id = " + file2ID;
Thanks for your help, but it did not work.
Similar Messages
-
Hi,
I am getting the following exception when i trying to insert data in to a table through a stored procedure.
oracle.apps.fnd.framework.OAException: java.sql.SQLException: ORA-01801: date format is too long for internal buffer
when execute this stored procedure from ana anonymous block , it gets executed successfully, but i use a OracleCallableStatement to execute the procedure i am getting this error.
Please let me know how to resolve this error.
Is this error something to do with the Database Configuration ?
Thanks & Regards
MeenalI don't know if this will help, but we were getting this error in several of the standard OA framework pages and after much pain and aggravation it was determined that visiting the Sourcing Home Page was changing the timezone. For most pages this just changed the timezone that dates were displayed in, but some had this ORA-01801 error and some others had an ORA-01830 error (date format picture ends before converting entire input string). Unfortunately, if you are not using Sourcing at your site, this probably won't help, but if you are, have a look at patch # 4519817.
Note that to get the same error, try the following query (I got this error in 9.2.0.5 and 10.1.0.3):
select to_date('10-Mar-2006', 'DD-Mon-YYYY________________________________________________HH24:MI:SS') from dual;
It appears that you can't have a date format that is longer than 68 characters. -
I have 2 tables in my database as:
db3
Code | number primary key
name | text
priceperqty | number
avail1 | number
tempupdate
transactedvalue | number
Code | number foreign key
I run following code:
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection(
"jdbc:odbc:inven");
Statement stmt = con.createStatement(
ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
stmt.setFetchSize(35);
ResultSet rs1=stmt.executeQuery("Select avail1,transactedvalue from db3,tempupdate where db3.code=tempupdate.code");
while(rs1.next())
//subtracting available value - transacted value
int a =rs1.getInt(1);
int b =rs1.getInt(2);
int c=b-a;
int d=-(c);
//storing results into an array
for(int i=0;i<4;i++)
y=d;
i++;
//printing on console
System.out.println(""+a);
System.out.println(""+b);
System.out.println(""+d);
//updating available values in table db3
for(int i=0;i<4;i++)
stmt.execute("update db3 set avail1="+y[i]+" where db3.Code=tempupdate.Code="+(i+1)+"");
catch (Exception ex)
ex.printStackTrace();
Why does avail1 attribute does not show any updations and throws exception of too few parameters?can anyone help me?
Edited by: Peter1 on Jul 2, 2008 4:39 AMzhaoyh wrote:
tmt.execute("update db3 set avail1="y" where db3.Code=tempupdate.Code="+(i+1)+"");
Changed it to PreparedStatement, and use ? for y. It should be
stmt.execute("update db3 set avail1=? where Code="+(i+1)+"");
If you're going to use PreparedStatement, it ought to be:
PreparedStatement ps = connection.prepareStatement("update db3 set avail1=? where Code=?");
ps.setInt(1, y);
ps.setInt(2, i+1);
ps.executeUpdate(); -
Error:[Microsoft][ODBC Micrsoft Access Driver] Not a valid password
Can anyone help me with this problem:
I have a Microsoft Access database with database password assign to it.
the following JAVA statement works for some users but not others:
connection.openConnection(databaseurl,"","");
all users are using same java application and points to same MS Access
database.
If I remove the database password, the statement works for all users.
Can anyone explain it why the above statement checking for password for some
users but not others?
thanks
David LingI'm not sure which JDBC driver you are using.
An access database, by default, has a username and
password as "admin" and "" (ie, empty password).
Actually MS Access has two methods for security. You
are referring to one of them.
If the password of admin is changed, you have to
provide the name of the workgroup information file
also( where it is stored) for making a connection.
I am not sure about the ODBC bridge driver. What iam
using is Atinav's aveConnet JDBC driver. It has
provision for giving username and passwords through
Workgroup information file. In addition to it youcan
give the database password also.
Interesting to note. The bridge for MS Access does
not use that security method. And it will fail if you
set up security using the groups/users adminstration.
The only method it allows is via the "database
password" method.Thank you for your response, but what User ID should I use when I use database password?
openConnection(URL,"xxxx","database password")
thanks again
David Ling -
Java.sql.sqlException using remote interface
hi guys,
i have successfully deploying my first CMP Entity Bean on WebLogic server. while using
my client application i have created the bean with the following code:
Object obj = (MyHomeInterface) ctx.lookup("Invoice.MyHomeInterface");
MyHomeInterface home = (MyHomeInterface) PortableRemoteObject.narrow(obj, MyHomeInterface.class);
MyRemoteInterface remote = (MyRemoteInterface) PortableRemoteObject.narrow(home.create(7), MyRemoteInterface.class);
remote.setInv();
above code successfully creates the Entity Bean which is available on the database i am using
Access database for this example but when i call its remote method setInv() which creates a
record in database against a particual id it gives me following error.
java.sql.sqlException {Mocrosoft}ODBC Microsoft Access Driver optional feature not implemented.
<<no stack trace available>>
plz let me know where i am doing wrong.
thanks.
AbidMS Access driver is not network supported. Instead you can try some type-4 drivers available for Access.
Have a look at,http://industry.java.sun.com/products/jdbc/drivers and choose a driver. -
i am trying to execute the following query using jdbc
String state = "select * from cs_test where Start_Time < DateAdd(\"s\",-19800,now()) AND End_Time >
DateAdd(\"s\",-19800,now())";
/java.sql.PreparedStatement querycs_test = c.prepareStatement(state);
java.sql.Statement querycs_test= c.createStatement();
java.sql.ResultSet rs = querycs_test.executeQuery(state);
when i run the same query at the prompt in MS Access it works fine.
The same line replaced with a simpler query works fine.
but when i run the above i get an error
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.Here's the value of your query before preparing it:
select * from cs_test where Start_Time < DateAdd("s",-19800,now()) AND End_Time > DateAdd("s",-19800,now())My SQL refererence doesn't have anything about functions called DateAdd or now. It might be Microsoft specific, in which case when your organization converts to another database your query is going to stop working. Don't use vender specific extensions.
Was your intention to call a Java method called DateAdd or now? Then your problem is a few missing quotes. Otherwise, I'm sorry I can't be of more help. -
Error: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
I am getting above error in my sql to access database. The program works fine if I remove where clause. But I need where clause for my prgoram. Actually, I am trying to work on user management aspect and it won't allow me to do.
String query = "select * from user where username="+name; s.execute(query);Thanks for the reply. Do you mean
Can you please further explain. I have a value against which querry is run. Say that value is stored in
String value; (stores the user names as string)
and then i create a querry like
String query = "select * from user where name= 'value'";
s.execute(query);
in above query
user is table name
name is a field which stores usersname.
if I put 'value' it does not work but i put actual names 'xxx' it works. But I cannot put actual names here. -
Hi friends,
Greetings.
i am trying to work with my inventory management system. My code is as follows and i getan error as follows:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few
parameters. Expected 1.
CODING:
import java.io.*;
import java.sql.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class iteminsert extends HttpServlet
public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException
Connection con;
Statement r,s;
ResultSet rs;
int flag1=0;//flag1 is for seeing if itemcode already exists
String str1,str2;
String s0=req.getParameter("itemcode");
String s1=req.getParameter("itemname");
int s2=Integer.parseInt(req.getParameter("unit"));
int s3=Integer.parseInt(req.getParameter("minlevel"));
int s4=Integer.parseInt(req.getParameter("rate"));
int a=1;
int b=0;
res.setContentType("text/HTML");
PrintWriter out=res.getWriter();
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:stocks");
r=con.createStatement();
s=con.createStatement();
rs=r.executeQuery("select * from stock where itemcode='"+s0+"'");
while(rs.next())
flag1++;
if(flag1!=0)
out.println("<body><h1 align=\"center\"><font color=\"green\">INVENTORY MANAGEMENT SYSTEM</font></h1><p>ITEM CODE ALREADY EXISTS!!!!</p><p>To insert an item with a different code, <a href=\"http://localhost:8000/stock/insert.html\">Click here</a> .</p><p>To go back to the main menu <a href=\"http://localhost:8000/stock/index.html\">click here</a></p></body>");
else
str1="insert into stock values('"+s0+"','"+s1+"',"+s2+","+s3+","+s4+","+a+")";
str2="insert into stock values('"+s0+"','"+s1+"',"+s2+","+s3+","+s4+","+b+")";
if(s3<=s4)
s.executeUpdate(str2);
out.println("<body><h1 align=\"center\"><font color=\"green\">INVENTORY MANAGEMENT SYSTEM</font></h1><p>ITEM HAS BEEN INSERTED. HOWEVER REORDER LEVEL IS <b><u>MORE THAN</u></b> QUANTITY AT HAND</p><p>To buy more <a href=\"http://localhost:8000/stock/purchase.html\">Click here</a></p><p>To go back to the main menu <a href=\"http://localhost:8000/stock/index.html\">click here</a></p>");
else
s.executeUpdate(str1);
out.println("<body><h1 align=\"center\"><font color=\"green\">INVENTORY MANAGEMENT SYSTEM</font></h1><p>ITEM HAS BEEN INSERTED.</p><p>To buy more <a href=\"http://localhost:8000/stock/purchase.html\">Click here</a></p><p>To go back to the main menu <a href=\"http://localhost:8000/stock/index.html\">click here</a></p></body>");
con.close();
catch(Exception e)
out.println("error"+ e);
Please help. I have to use only Create statement and not PreparedStatement :(
Thank You.
Regards.
Aravindyour code is wrong on so many levels.
you should not be embedding HTML in Java objects this way. wrong, wrong, wrong.
JSPs are what you should be using.
look at this line:
rs=r.executeQuery("select * from stock where itemcode='"s0"'");the SQL query is supposed to be a bloody string. yours won't even compile.
do it this way:
PreparedStatement ps = connection.prepareStatement("select * from stock where itemcode = ?");
ps.setString(1, itemCode);
rs = ps.executeQuery();you don't close resources. you don't use code tags.
too much wrong to fix here.
% -
Error...java.sql.SQLException:Access denied for user
Hi,
I am getting the following error message while connecting with the MySQL .(O/S :Sun OS 5.6)
Error.....java.sql.SQLException: Invalid authorization specification: Access denied for user: 'some_user&password@localhost' (Using password: NO)
Note that i have given all permission to the user using,
GRANT ALL PRIVILEGES .......................
The code i have used to connect with the database is,
import java.io.*;
import java.sql.*;
class test
public static void main(String a[])
try
Connection con;
Statement stmt;
ResultSet rs;
Class.forName("org.gjt.mm.mysql.Driver");
con=DriverManager.getConnection(jdbc:mysql://localhost/db_name?user=some_user&password=some_pass");
stmt=con.createStatement();
//do something with resultset
catch(Exception e)
System.out.println("Exception in second try.."+e);
plese guide me on this problem to solve.
Thankz,
Bala.Hi friends...
I've read the last post...
The problem that I have is as follow....
1. I have installed on my machine MySQL 5.0 Server running
1.1 I have a database called "base1"
1.2 User "root", password "works"
1.3 I have the following sentence to connect it using JDBC
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/base1", "root", "works");
More notes:
- I use the JDBC 5.0
- My Machine is a Windows XP SP2 Pentium 3.0 512Mb
and it connects����
but I have this environment to develop applications, now that I want to connect to Production Environment happens the following:
2 The Production database is mounted on a Linux Server with MySQL 3.2.
2.1 I change the sentences as follow:
Connection con = DriverManager.getConnection("jdbc:mysql://192.168.0.7/base1", "user", "password");
2.3 But a message appears when I run the Java Program:
java.sql.SQLException:Access denied for user: '[email protected]' (Using password: YES)
2.4 As you can see it changes the IP Address...
More notes:- I have the MySQL Query Browser and I got connection.
- The IP that display the Error Message is my Second IP configurated on my Network Properties.
- Server is a Pentium 4 3.0 GHz 2Gb Linux Red Hat 3.0
I leave this case for the spider... I hope that somebady has the solution.
What is the problem? Why the JDBC doesn't respect the IP that I wrote. -
PLEASE HELP - unreported exception java.sql.SQLException
Basically create a database where Time is a field where its automatic enters date and time so no records need to be entered. and the Amount is when the user clicks on a button that amount is stored..basically how do i insert just the amount field
heres a snippet of the code..
CarParkDB db=new CarParkDB();
db.DBConnection();
String sql="insert into Stats (Time, Amount)"+
"values ('"+null+"','"+amount+"')";
db.s.executeQuery(sql); // executing the sq
Please kindly help me..thank youDont understand or know what the SQL is. The code is
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String sourceURL =
"jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=CarPark.mdb;";
Connection CarPark =
DriverManager.getConnection(sourceURL, "admin", "");
Statement myStatement = CarPark.createStatement();
String writeString =
"insert into Stats(Amount) values("+(payment / 100.0)+")";
myStatement.executeUpdate(writeString);
ResultSet results = myStatement.executeQuery
("SELECT Amount, Time");
while (results.next()) {
System.out.print(results.getString(1) + " ");
System.out.print(results.getString(2) + " ");
System.out.println(results.getString(3));
results.close();
Error is: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
I have two colums in the db - Time & amount. The time is updated, but the amount is not. -
Hi !!!
I was working ok, with hibernate and mysql but yesterday I try to install the new mysql version (4.1.10) and receive the following error when I try to connect
Initializing Hibernate
INFO - Hibernate 2.1.6
INFO - hibernate.properties not found
INFO - using CGLIB reflection optimizer
INFO - configuring from resource: /hibernate.cfg.xml
INFO - Configuration resource: /hibernate.cfg.xml
INFO - Mapping resource: com/tutorial/hibernate/core/News.hbm.xml
INFO - Mapping class: com.tutorial.hibernate.core.News -> news
INFO - Configured SessionFactory: null
INFO - processing one-to-many association mappings
INFO - processing one-to-one association property references
INFO - processing foreign key constraints
INFO - Using dialect: net.sf.hibernate.dialect.MySQLDialect
INFO - Maximim outer join fetch depth: 2
INFO - Use outer join fetching: true
INFO - Using Hibernate built-in connection pool (not for production use!)
INFO - Hibernate connection pool size: 20
INFO - using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://localhost/unnobanews
INFO - connection properties: {user=news, password=news}
INFO - Transaction strategy: net.sf.hibernate.transaction.JDBCTransactionFactory
INFO - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
WARN - Could not obtain connection metadata
java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
at org.gjt.mm.mysql.MysqlIO.init(Unknown Source)
at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source)
at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown Source)
at org.gjt.mm.mysql.Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
Somewhere I red that was necessary to update the jdbc driver, so I updated it from version nro 2 to version nro 3.1.7 but still the error
Phpmyadmin works ok and mysql control center can connect ok too.
But when I try a telnet localhost:3306 I receive and error of connection filed
Anyway the mysql status thowme correct information, that it working ok!
Any idea ?
King regards
NatyHibernate 2.1.6
loaded properties from resource hibernate.properties: {hibernate.connection.username=root, hibernate.connection.password="", hibernate.cglib.use_reflection_optimizer=true, hibernate.connection.pool_size=10, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.connection.url=jdbc:mysql://manoj/manoj, hibernate.connection.driver_class=org.gjt.mm.mysql.Driver}
using CGLIB reflection optimizer
configuring from resource: /hibernate.cfg.xml
Configuration resource: /hibernate.cfg.xml
Mapping resource: com/mec/emp.hbm.xml
Mapping class: com.mec.Employee -> emp
Configured SessionFactory: null
processing one-to-many association mappings
processing one-to-one association property references
processing foreign key constraints
Using dialect: net.sf.hibernate.dialect.MySQLDialect
Maximim outer join fetch depth: 2
Use outer join fetching: true
Using Hibernate built-in connection pool (not for production use!)
Hibernate connection pool size: 10
using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://manoj/manoj
connection properties: {user=root, password=""}
No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
Could not obtain connection metadata
java.sql.SQLException: Server configuration denies access to data source
at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:144)
at org.gjt.mm.mysql.Connection.<init>(Connection.java:230)
at org.gjt.mm.mysql.Driver.connect(Driver.java:126)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:101)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1155)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:789)
at com.mec.CreateSession.getCurrentSession(CreateSession.java:35)
at com.mec.TestEmployee.createEmployee(TestEmployee.java:37)
at com.mec.TestEmployee.main(TestEmployee.java:24)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
Use scrollable result sets: false
Use JDBC3 getGeneratedKeys(): false
Optimize cache for minimal puts: false
Query language substitutions: {}
cache provider: net.sf.hibernate.cache.EhCacheProvider
instantiating and configuring caches
building session factory
Not binding factory to JNDI, no JNDI name configured
SQL Error: 0, SQLState: 08001
Server configuration denies access to data source
Cannot open connection
java.sql.SQLException: Server configuration denies access to data source
at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:144)
at org.gjt.mm.mysql.Connection.<init>(Connection.java:230)
at org.gjt.mm.mysql.Driver.connect(Driver.java:126)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:101)
at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:286)
at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3326)
at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3286)
at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40)
at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19)
at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2231)
at com.mec.TestEmployee.createEmployee(TestEmployee.java:38)
at com.mec.TestEmployee.main(TestEmployee.java:24)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
Process finished with exit code 0 -
Error java.sql.SQLException
My patch management update is set to fire off at 2:00am. In my loader-messages.log I have
[DEBUG] [7/28/10 2:09:38 AM] [] [ImportContent] [] [Done processing: abaafc6c0bb1427e2fdda82450ff5485] [] []
[DEBUG] [7/28/10 2:09:40 AM] [] [Loader.PatchSubscriptionService] [] [Error Delete signature with name C122AA6FC4B002B18DD52FE31E7DA934] [] []
[DEBUG] [7/28/10 2:09:40 AM] [] [Loader.PatchSubscriptionService] [] [org.hibernate.exception.ConstraintViolationExcepti on: could not delete: [[com.patchlink.sapphire.datamodel.PatchSignature#12 677]]
at org.hibernate.exception.SQLStateConverter.convert( SQLStateConverter.java:71)
at org.hibernate.exception.JDBCExceptionHelper.conver t(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersi ster.delete(AbstractEntityPersister.java:2384)
at org.hibernate.persister.entity.AbstractEntityPersi ster.delete(AbstractEntityPersister.java:2516)
at org.hibernate.action.EntityDeleteAction.execute(En tityDeleteAction.java:73)
at org.hibernate.engine.ActionQueue.execute(ActionQue ue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(Ac tionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeActions(Ac tionQueue.java:144)
at org.hibernate.event.def.AbstractFlushingEventListe ner.performExecutions(AbstractFlushingEventListene r.java:297)
at org.hibernate.event.def.DefaultFlushEventListener. onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.j ava:988)
at org.hibernate.impl.SessionImpl.managedFlush(Sessio nImpl.java:337)
at org.hibernate.transaction.JDBCTransaction.commit(J DBCTransaction.java:106)
at com.novell.zenworks.lumension.PatchManager.deleteP atchSignatureByMD5(PatchManager.java:718)
at com.novell.zenworks.lumension.PatchSubscriptionSer vice.processAction(PatchSubscriptionService.java:3 86)
at com.novell.zenworks.loader.modules.queue.runner.Qu eueThreadWorker.processAction(QueueThreadWorker.ja va:208)
at com.novell.zenworks.loader.modules.queue.runner.Qu eueThreadWorker.run(QueueThreadWorker.java:139)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:651)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:676)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: [[Sybase]][[ODBC Driver]][[SQL Anywhere]]Primary key for row in table 'PATCHSIGNATURE' is referenced by foreign key 'FK38670AEAB227C794' in table 'BaseLineGroupPatchSignature'
at ianywhere.ml.jdbcodbc.IIPreparedStatement.executeU pdate(Native Method)
at ianywhere.ml.jdbcodbc.IPreparedStatement.executeUp date(IPreparedStatement.java:219)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement .executeUpdate(NewProxyPreparedStatement.java:105)
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(N onBatchingBatcher.java:23)
at org.hibernate.persister.entity.AbstractEntityPersi ster.delete(AbstractEntityPersister.java:2363)
... 17 more
There are several more error messages but I suspect they all stem from this first one. Do I have to do DB stuff or if I turn the other way will it .....
Maybe I could press that magic button again? Anyone?
CheersGERWIL,
It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.
Has your problem been resolved? If not, you might try one of the following options:
- Visit http://support.novell.com and search the knowledgebase and/or check all
the other self support options and support programs available.
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://forums.novell.com)
Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.novell.com/faq.php
If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.
Good luck!
Your Novell Product Support Forums Team
http://support.novell.com/forums/ -
Hi,
I am writing a simple program wihich will display the list of table for a given database. Currently I am using JDBC-ODBC bridge for accessing MS Acccess data base. When I call getTables method of DatabaseMetaData. Following Exception was thrown. Any clue what could be the reason for this?
Exception java.sql.SQLException: [Microsoft][ODBC Microsoft Access 97 Driver]Driver not capable
java.sql.SQLException: [Microsoft][ODBC Microsoft Access 97 Driver]Driver not capable
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6106)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6263)
at sun.jdbc.odbc.JdbcOdbc.SQLTables(JdbcOdbc.java:4917)
at sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTables(JdbcOdbcDatabaseMetaData.java:2395)
at test.databaseMetaData.main(databaseMetaData.java:36)
This exception occured in the following block:
String[] strTables = {"TABLES"};
rs = dbmd.getTables( null, "DBIS", "A%", strTables);
Thanks in advance
Cheers,
KrishnaHi Krishna,
First, do you have a correct ODBC setup on the platform your working on -- data source, etc.
Second, please enclose the Java code for your connection, etc..
Good luck!
Francis -
Hello. I'm trying to do an INSERT into an MS Access 2002 database, and this is throwing:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] '' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.
The INSERT is pretty straight forward:
INSERT INTO Nodes (ID, Name, IP, DateAdded) values ("m22", "Colt,Frankfurt,GR", "213.61.48.52", "2003-02-06")
ID is a TEXT field of length 3 and it is the key (table is currently empty)
Name is a TEXT field of length 50.
IP is a TEXT field of length 16.
DateAdded is TEXT field of length 10.
I tried putting dummy data into the table and doing a SELECT, and that worked without a problem.
Can anyone tell me what is or might be causing this? Thanks in advance!!!
- john ferguson, kansas cityOkay, I fixed this.
The fix was to change the double quotes (") to single quotes (') inside the VALUES part of the statement.
So it went from:
INSERT INTO Nodes (ID, Name, IP, DateAdded) values ("m22", "Colt,Frankfurt,GR", "213.61.48.52", "2003-02-06")
to:
INSERT INTO Nodes (ID, Name, IP, DateAdded) values ('m22', 'Colt,Frankfurt,GR', '213.61.48.52', '2003-02-06')
and now it works fine. -
Hello together!
I am trying to add a long value to an access db.
(I have a PreparedStatement.)
But I get the following error:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLBindInParameterBigint(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setLong(Unknown Source)
at Import.writeLineToDb(Import.java:70)
at Import.main(Import.java:40)
when exucuting the followint line:
statement.setLong(2,new Long(data[1]).longValue());
How can I find out which feature is missing and install it?
Thanks.
MarkusCould it be that the driver is not installed for that?
I am connecting like that:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
connection = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ="+path, "", "");
Thanks for your help.
Maybe you are looking for
-
Hi My current apple id is not an email address I have used all over my iPad but when I tried to activate iCloud it demanded an email address. I do have two and so far neither has worked. Any ideas pleae?
-
How to get the link of the WDA application dynamically
Hi, I have created one web dynpro application. when it is saved the approver get a work item in his inbox.The work item should have the link to the web dynpro application.So that when the user clicks the link,He should able to view the web dynpro
-
Hello, I need some help to understand the determinations and agreements. If I work with BPM I have to create different flows (flow = wizard walkthrough). For example I created a web service that starts a S/A-Bridge in a BPM. Next step is a sync call
-
Spotify won't open on Windows 8.1
Hi! A day ago, my Spotify desktop app was working fine, but now today, I am experiencing issues where Spotify doesn't open at all when I click the icon on the desktop, and when I click it on the taskbar, the icon glows like it's open, then fades and
-
Retrieve the PCD of the webdynpro Iview
Hi! I have created an application with just one View. How can I retrieve the PCD of the iview of this application in the wdDoInit()? I want to be able to retrieve: portal_content/roleA/worksetB/pageC/iviewD. Another example is portal_content/roleX/wo