• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

[ODBC Microsoft Access Driver]Optional feature not implemented

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have a strange error. I have a java application, connecting to a MSAccess database. When I do a SQL statement that tries to update the following:
"update consultant set name = 'checking for UPDATE' where (consultant_id = 1)"
I get the following error:
"[Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented"
But if I change the string to be updated, to say:
"update consultant set name = 'checking xxx UPDATE' where (consultant_id = 1)"
It updates with no problems.
I presume that 'checking for UPDATE' is a reserved string. But why can't I update this string to the database? It is enclosed in quotes.
Does anyone have any explanation/resolution for this?
I have an JDBC/ODBC bridge connection to a MSAccess 2002 database using the following driver: "Microsoft Access Driver 4.00.6019.00" set up in Windows XP's ODBC Data Source Administrator.
I Use the following DriverManager: "sun.jdbc.odbc.JdbcOdbcDriver" and ConnectionString: "jdbc dbc atasource_name" where "datasource_name" is the name of the ODBC datasource.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i've too faced the same problem with Access database & what i've figured out is that "Optional feature not implemented" means there is some SQL error (SQL that is not supported by Access is being used).....i really can't figure out why this error occurs, but since FOR is a keyword in SQL, it could be a problem (but then again, you've enclosed it in quotes)...
try using the same using Oracle or some other database & if it works, then Access is the cause for your error....else we'll just have to wait for some of the gurus to clear this doubt...!
 
Blikkies Marais
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Itried MS SQLServer and I don't get the problem. Also when I run the SQL statement in the MSAccess SQL worksheet directly I get no errors. This leads me to think it is an error with the ODBC driver.
Any Ideas?
 
Ram Mohan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i did some searching on the net & what i found out was that it's an error returned from your ODBC driver. Here is a link direct from Microsoft
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odch15pr_6.asp
don't blame me if you don't understand what's written there.....
one guess is that the datatypes in your database & your call to the executeQuery method might not match, you haven't given all the required fields (even fields which can be left blank in the DB have to be supplied to the ODBC driver, great work Microsoft!)
let me know if your problem gets solved.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tried the above and used a BigDecimal instead of a long (despite the fact that it's a long in my access database (get Bill Gates in here) and it worked.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the same problem using Java ODBC connection to Microsoft Access Database. I'm trying to insert a string in a MEMO field which contains the words ' for update'. By processing one character at a time, I was able to determine that this is exactly the problem. If any one letter is changed, it works fine. I tried looking for special characters, there were none. The problem is obviously as described above. For some reason, the ODBC driver is parsing the literal instead of simply passing it on. The problem only presents itself when there is a space in front of the word FOR. The word update can be updated or anything following it and it still causes the error. The problem does not exist when the SQL is entered directly into an Access query in Access. I found no good workaround. I will search strings for this problem and split them as they are added to the DB such that the given SQL Update command doesn't contain that literal.

Error given: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
Using Java: NetBeans v8.0
Using Driver: sun.jdbc.odbc.JdbcOdbcDriver
Microsoft Access: v2010
ODBC connection string: jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=[filename];DriverID=22}
Using: Windows v7
sample SQL causing error: update Info set finalsolution=' for update' where idx=1;

It has been 10 years since the error was found, and it still exists...
 
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JDBC/ODBC bridge driver has always been buggy, hasn't been updated for years, and if I'm not mistaken, has been removed altogether from Java 8. I think the sooner you migrate to some other driver the happier you'll be :-)
 
reply
    Bookmark Topic Watch Topic
  • New Topic