Two more Access/Java questions
- From: "Rhino" <no.offline.contact.please@xxxxxxxxxx>
- Date: Tue, 30 May 2006 12:01:22 -0400
Does anyone know why I am getting -1 as a return code from commands like
DROP TABLE and CREATE TABLE? I am using an Access 2002 database with the
sun.jdbc.odbc.JdbcOdbcDriver driver in rt.jar. I am using JDK 1.5.0_06.
The commands appear to be working correctly. For example, the table existed
and was accessible before I executed DROP TABLE, then was gone after I ran
the DROP TABLE. I was using a Statement object and, according to the API,
the executeUpdate() method should return the number of rows inserted,
updated, or deleted if the command inserted, updated, or deleted rows or 0
if the command was anything else. The API doesn't state any conditions under
which a command should return -1.
What is Access or the driver trying to tell me by giving me a -1 as the
result of executeUpdate()?
--
Also, am I correct in believing that Jet SQL, the dialect of SQL used by
Access, does not support the GRANT command? I was trying to do a "GRANT ALL
on myTable to PUBLIC" within my Java program but got errors suggesting that
the GRANT command was not one recognized by the driver or Access. I don't
recall the message now and have already deleted the code, otherwise I'd
simply rerun it and give you the exact message.
--
Rhino
.
- Follow-Ups:
- Re: Two more Access/Java questions
- From: Bjorn Abelli
- Re: Two more Access/Java questions
- Prev by Date: Access/Java Question
- Next by Date: Re: connectionless resultset [please help]
- Previous by thread: Access/Java Question
- Next by thread: Re: Two more Access/Java questions
- Index(es):
Relevant Pages
|
|