Error when update: Optional feature not implemented
Hi, all,
I got the exception: "[Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented" when I use MS Access to update my record.
I searched the forum, but i couldn't get my answer. I can do select and insert into this table. but i couldn't update it. I am using jdbc-odbc driver. Thanks.
The code I am using:
int date = 186;
String id = "BUF";
String max = id + "_MX";
//String min = id + "_MN";
//String prec = id + "_P";
query = "update " + tableName + " set " + max + "=? where date=?";
try {
ps = con.prepareStatement(query);
ps.clearParameters();
ps.setFloat(1, getMax());
// ps.setFloat(2, getMin());
// ps.setFloat(3, getPrecip());
ps.setInt(2, date);
result = ps.executeUpdate();
ps.close();
} catch (SQLException e) {
System.out.println("Database error, " + e.getMessage());
Thanks everybody! The problem was solved. I should use setDouble() other than setFloat() method.
Similar Messages
-
Hi All,
when i add setAutoCommit(false),
i got run error [Microsoft][ODBC Excel Driver]Optional feature not implemented.
i just want to insert data into excel using db.
can anyone give suggestion??
here my code:
public void insertDatabase( ){
String rule = "fty";
double weight = 0.245;
try{
String sql = "INSERT INTO [Sheet2$] ( Rule, Weight ) " +
"VALUES ( '"+ rule +"', '" + weight + "' )";
int row = myStatement.executeUpdate(sql);
myConnect.setAutoCommit(false);
myResultSetPapar = myStatement.executeQuery("Select * from [Sheet2$]");
catch(SQLException e){
System.out.println(e.getMessage());
}//catch
}is it true that my driver does not supported??
my MS Excel version 2002
and driver vers. 4.0 -
SetDate Error - Optional feature not implemented
Hi I am trying to execute a PreparedStatement to do an insert, I to the best of my knowledge am using it correctly but I still get this ERROR:
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Optional feature not implementedHere is a code sample:
//SQL Create Table
create table[test]
[id] int not null identity primary key,
[name] varchar(30) not null,
-- [date] datetime not null --Same result with this
[date] smalldatetime not null
GO
//Java Code
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
public class DataExporter {
private Connection conn = null;
private PreparedStatement prep = null;
public DataExporter() throws Exception{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection("jdbc:odbc:MyDatabaseDNSName");
prep = conn.prepareStatement("INSERT INTO [TEST] ([NAME],[DATE]) VALUES(?,?)");
public boolean run(String name, java.sql.Date date) throws Exception{
prep.setString(1, name);
prep.setDate(2, date);
return prep.execute();
public static void main(String[] args) throws Exception{
DataExporter dExp = new DataExporter();
java.sql.Date date = new java.sql.Date(System.currentTimeMillis());
System.out.println("Check Value:\t" + date.toString());
System.out.println("Result:\t" + dExp.run("Neil", date));
}This is my results:
Check Value: 2008-09-10
Exception in thread "main" java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Optional feature not implemented
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
at sun.jdbc.odbc.JdbcOdbc.SQLBindInParameterDate(JdbcOdbc.java:808)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setDate(JdbcOdbcPreparedStatement.java:826)
at DataExporter.run(DataExporter.java:14)
at DataExporter.main(DataExporter.java:21)
Java Result: 1Can someone please tell me why and how to fix the above to get it to work.(I am using Java 6 and MSSQL 2000)
Thanx in advancegtRpr wrote:
Thanx yawmark, I will try it.
Just tell me: although I am using Java 6 at home,
I use Java 1.4 at work were I will actually need this,
What is the minimum version of Java that JTDS will work with(1.1, 1.2, 1.3, 1.4, 1.5, 1.6)? [JTDS feature matrix|http://jtds.sourceforge.net/features.html] (from the link I already posted).
~ -
Microsoft][ODBC SQL Server Driver]Optional feature not implemented
this is my program code for java jdbc:odbc SQL connectivity
but iam getting the error as
*java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Optional feature not implemented*
package desktopapplication2;
import java.sql.*;
* @author Bharat Raj Verma
public class db {
void get(String gr,String fn,String ln,String job ,Integer rate,Integer ot,String att,long amt,String cmt)
try
Connection con=null,con1=null;
Statement stmt2;
String query = "Update dbo.attend SET Gr = ? , fn = ? ,ln = ?, job = ? , rate = ? , ot = ? , att = ? ,amt = ? , comment = ?";
// String query1 = "Select accnum rom dbo.newacc where accnum= ?";
String url = "jdbc:odbc:bharat";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection(url,"","");
con1 = DriverManager.getConnection(url,"","");
System.out.println("connection Established");
stmt2 = con.createStatement();
Statement stmt = con1.createStatement();
ResultSet rs;
rs=stmt.executeQuery("select * from dbo.attend");
while(rs.next())
String cmp1= rs.getString("gr");
if(cmp1.equalsIgnoreCase(gr))
PreparedStatement ps1 = con.prepareStatement(query);
System.out.println("Insisde RS");
ps1.setString(1,gr);
ps1.setString(2,fn);
ps1.setString(3,ln);
ps1.setString(4,job);
ps1.setInt(5,rate);
ps1.setInt(6,ot);
ps1.setString(7,att);
ps1.setLong(8,amt);
ps1.setString(9,cmt);
System.out.println("SSS");
// ps1.setString(1,gr);
ps1.executeUpdate();
System.out.println("Success");
catch(Exception e1)
System.err.println(e1);
}This is the SQL table in which iam trying to insert the value
SET ANSI_PADDING OFF
create table attend
Gr VARCHAR(20) primary key,
fn VARCHAR (25),
ln VARCHAR(25),
job VARCHAR(25),
rate integer,
ot integer,
att varchar(10),
amt varchar (10),
comment varchar(70)
)the complete output is
init:
deps-jar:
Compiling 1 source file to C:\Documents and Settings\Bharat Raj Verma\My Documents\NetBeansProjects\DesktopApplication2\build\classes
compile:
run:
connection Established
Insisde RS
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Optional feature not implemented
BUILD SUCCESSFUL (total time: 29 seconds)
here is the stack trace
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Optional feature not implemented
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLBindInParameterBigint(JdbcOdbc.java:1225)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setLong(JdbcOdbcPreparedStatement.java:592)
at desktopapplication2.db.get(db.java:47)
at desktopapplication2.DesktopApplication2View.jButton1ActionPerformed(DesktopApplication2View.java:394)
at desktopapplication2.DesktopApplication2View.access$800(DesktopApplication2View.java:22)
at desktopapplication2.DesktopApplication2View$4.actionPerformed(DesktopApplication2View.java:183)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:5517)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5282)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3984)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1791)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Plz can anyone help ???and what was the solution?
thanks in advance
brindy -
Help on "optional feature not implement" exception
I am trying to use JDBC to update the MS Access table. the SQL is :
" insert int table1 ([file name],[file description]) values ('DXXCP','RPF PRINT FILE FOR UPDATES');
By runing this statement, I keep getting "optional feature not implemented" exeption. can any one tell me how to insert this record into Access using JDBC? thanksThis successfully inserted your strings into an Access database:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
public class InsertTest
public static void main(String [] args)
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connection = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=InsertTest.mdb");
String query = "INSERT INTO table1([file name],[file description]) VALUES(?, ?)";
PreparedStatement statement = connection.prepareStatement(query);
statement.setString(1, "DXXCP");
statement.setString(2, "RPF PRINT FILE FOR UPDATES");
int rowCount = statement.executeUpdate();
System.out.println(rowCount + " rows affected");
statement.close();
connection.close();
catch (SQLException sqle)
System.err.println("SQL State: " + sqle.getSQLState());
System.err.println("SQL Error: " + sqle.getErrorCode());
sqle.printStackTrace(System.err);
catch (Exception e)
e.printStackTrace(System.err);
}Use PreparedStatement. -
Getting [Microsoft][ODBC SQL Server Driver] Optional feature not implemented
I am using below mentioned code to insert values in MSAccess 2000 which having table structure as mentioned below:-
Field Name Data Type
TodaysDate Date/Time
Cart ID Number
Client Name Text
Campaign Text
Team & Segment Text
Duration Number
Tape ID Text
Start Date Date/Time
End Date Date/Time
Station Text
Code:-
private boolean enterDataIntoMSAccessDatabaseusingPreparedStatement()
try {
ps = connection.prepareStatement("INSERT INTO Cart ID Details VALUES (?,?,?,?,?,?,?,?,?)");
System.out.println("After Query");
catch (SQLException se) {
generateErrorMessage("Error in Prepared Statement \n " + se.getMessage() );
return false;
catch (Exception e)
generateErrorMessage("Unexpected Error Occured \n " + e.getMessage());
String todaysDate = cartIDApplicationAddCartIDDatejTextField.getText().trim();
String cartID = cartIDApplicationAddCartIDCartIDjTextField.getText().trim();
String clientName = cartIDApplicationAddCartIDClientNamejTextField.getText().trim();
String campaign = cartIDApplicationAddCartIDCampaignjTextField.getText().trim();
String teamSegment = cartIDApplicationAddCartIDTeamAndSegmentjTextField.getText().trim();
String duration = cartIDApplicationAddCartIDDurationjTextField.getText().trim();
String tapeID = cartIDApplicationAddCartIDTapeIDjTextField.getText().trim();
String startDate = cartIDApplicationAddCartIDStartDatejTextField.getText().trim();
String endDate = cartIDApplicationAddCartIDEndDatejTextField.getText().trim();
String station = cartIDApplicationAddCartIDDELjCheckBox.getText().substring(0, 3);
System.out.println(station);
try {
System.out.println("Before ps.setString()");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-mm-dd", Locale.ENGLISH);
System.out.println("Simple Date Format");
/*ps.setString(1, todaysDate);
ps.setString(2, cartID );
ps.setString(3, clientName);
ps.setString(4, teamSegment);
ps.setString(5, duration);
ps.setString(6, tapeID);
ps.setString(7, startDate);
ps.setString(8, endDate);*/
System.out.println("1");
ps.setDate(1, new java.sql.Date(simpleDateFormat.parse(todaysDate).getTime()));
ps.setString(2, cartID);
ps.setString(3, clientName);
ps.setString(4, campaign);
ps.setString(5, teamSegment);
ps.setString(6, duration);
ps.setString(7, tapeID);
ps.setDate(8, new java.sql.Date(simpleDateFormat.parse(startDate).getTime()));
ps.setDate(9, new java.sql.Date(simpleDateFormat.parse(endDate).getTime()));
ps.setString(10, station);
System.out.println("After ps.setString()");
ps.executeUpdate();
catch (SQLException se) {
generateErrorMessage("Error while inserting data in database \n " + se.getMessage());
return false;
catch (Exception e)
generateErrorMessage("Unexpected Error Occured \n" + e.getMessage() );
return true;
I got below error after implementing the above code:-
[Microsoft][ODBC SQL Server Driver]Optional feature not implemented.
Kindly help me for the same.>> [Microsoft][ODBC SQL Server Driver]
I don't see anything Oracle in your question. It looks like you're getting an error using Microsoft's SQL Server driver, did you mean to post this to a forum on Microsoft's site perhaps? -
[ODBC SQL Server Driver]Optional feature not implemented
Hi,
Has anyone faced such error @ analysis,
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 16001] ODBC error state: S1C00 code: 0 message: [Microsoft][ODBC SQL Server Driver]Optional feature not implemented. [nQSError: 16012] ODBC error occurred while binding the parameters of a SQL statement. (HY000)
we are having some issue on DBfeature check box issue.
Thanks
DevaHi,
Yes. after that only i am getting error. if i enabled Query DBMS then report is working with out error (we don't want to use query dbms option that's i just query dbms off option by Reset to default) then its thoewing error.
Thanks
Deva -
Optional Feature Not Implemented
Can anybody tell me the cause of this SQLException -
Optional Feature Not Implemented ?
I am getting this exception when i try to make my resultset scrollable -
nConn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
or either use PreparedStatement.
It occurs only when i use MSAccess or SQLServer Database. It doesnot occur with Oracle.
whats the solution of this ?
Thanks
SonalpThere are several JDBC drivers for SQL Server, use one that support scrollable resultsets. The JDBC2 standard is made up of one required part and one optional package that the driver manufacturer might implement.
Microsoft has released (or are about to, it might be beta) a driver of their own that should support scrollable resultsets. You can find it at http://www.microsoft.com/sql/downloads/2000/jdbc.asp
/Fredrik -
Error when sending message: Method not implemented
Hi, All:
We have newly setup system and when we test sending test message from RWB, (RWB-Component Monitoring-Integration Engine-Test Tab), we got following error:
"Error when sending message: Method not implemented", I know this is related to post configuration issue, I just know someone has come cross the situation and how it was resolved.
Thanks
LiangHI Liang
Yes it looks like post installation problem. I have not come across this but i think you should check with the RFC created for IE while installation. To connect IE & AE and even the exchange profile if something is missing
Thanks
Gaurav -
Adobe Bridge CS4 pops error when Update Option from Help is launched
Hi All,
when i m trying to Launch the Update from the help menu of Adobe Bridge it pops-up with a error messge instead of launching update.
The error says
Adobe Bridge
Bridge is not in a position to check for updates.
The cause of the error may lie in the fact that an Internet connection can be established or that you are logged in as a user without administrator privileges.
Ok
Please help what is the probable cause for this.
I have tried disabling the updateoption by
1) Adding the Enterprise DWORD value in registry HKLM\Software\Adobe\Updater
2) Adding the "Update" "Suppress" value in "Application.XML.Override" file while installing the CS4 Suite
I am using Vista Build is the behavioural diff seen on XP n Vista
Thank YouHey
Apologies I dont think I had made myself clear.
I am trying to package Adobe Photoshop CS4 which has Adobe Bridge as a component. As per the company standards, I am suppossed to be deploying this package & installing it using silent setup. Since this is a corporate environment, they do not want any auto updates to be enabled, as well as disable all menu items related to updates. Hence I had checked through the Adobe Support Site and followed the instructions provided by using the Adobe Deployment Toolkit and supressed the updates using the tool.
Inspite of following the steps mentioned in the Deployment Kit and the guides associated with it, I was unable to supress the Updates options that reflects under Help Menu for Adobe Bridge CS4. All the other associated programs like photoshop, Extend Scripts etc the updates are disabled. The problem seems to be only with the Adobe Bridge Update.
I have also tried disabling the update option by
1) Adding the Enterprise DWORD value in registry HKLM\Software\Adobe\Updater
2) Adding the "Update" "Suppress" value in "Application.XML.Override" file while installing the CS4 Suite
Inspite of trying the above steps the update option in the menu is still enabled and when I click on the updates menu item I get the following error message.
Adobe Bridge
Bridge is not in a position to check for updates.
The cause of the error may lie in the fact that an Internet connection can be established or that you are logged in as a user without administrator privileges.
Ok
Please advise, -
Optional feature not implemented while using SQL server
Hi to all
I am using SQL server.
I have written a stored procedure in SQL server and it is taking the datetime data type as one parameter.
I have written the following java code to call that procedure.
Calendar calendar= Calendar.getInstance();
cs.setDate(4,new java.sql.Date(calendar.getTime().getTime()));
cs.execute();
waiting for reply.
datetime is the 4th parameter.the question has been resolve.the datasource with excel is not schema!
-
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Optional feature not implemented
Have anyone seen this exception before????? I see this exception when I use the "setNull()" function in the preparedstatement class.statement.setNull(index, Types.NUMERIC); //works
statement.setNull(index, Types.DECIMAL); //does not work -
I have an iPad 2 w/wi-fi, 16 GB. I would like to update my software version from 4.3 to a later versionn; however, when I go into Settings, General, the "Software Update" option is not there???
Judi126 wrote:
... "Software Update" option is not there???
That is only a feature of iOS 5 or later...
You have iOS 4... See Here...
http://support.apple.com/kb/HT4972
OR...
Connect to iTunes on the computer you usually Sync with and “ Check for Updates “...
See the Using iTunes Section Here...
How to update your iPhone, iPad, or iPod touch -
HT4623 when i go in general then software update option is not coming?
when i go in general then software update option is not coming? i am unable to istall whats up..? it comes that update to ios 4.3. but in my phone software update option is not coming
An iPhone 3G can't be updated past 4.2.1.
(93404) -
Error when updating Playbook OS version via Blackberry Desktop Manager
Greeting,
I have a batch of old playbooks which having the stack charging issue, but I found that I can update the OS to the newest version (2.1.0.1917) via Blackberry Desktop Manager, then the charging algorithm will be changed to the updated one and go over this dead battery issue. I was able to do so successfully in the past week smoothly on several devices.
But since this Monday, the Desktop Manager is saying "An updated Blackberry Desktop Software component must be installed before you can continue" when downloading the Desktop software and will appear "There was an error updating your software, an error has occurred while downloading the Blackberry Desktop Software.Please try again." and preventing the process. Seems there are some change on the server side starting this week which has caused this problem, but there's no error code to locate the exact issue.
I tried on 2 different computers as well as completed uninstalling and re-installing the Desktop manager, also tried to disable the automatic update as been advised in some threads. So no clue how to deal with it for now. It will be highly appreciate if some one can share some idea.
I've attached the step by step screenshots for reference, where you can find here:
http://forums.crackberry.com/blackberry-playbook-f222/error-when-updating-playbook-os-version-via-bl...
Thanks,BLock wrote:
Sorry I can not help you with your problem but perhaps you can help me.
Can you advise where I can find info on "disable the automatic update"?
just ignore the update if you dont want it on the playbook
for reloading the OS
First I would like you to do a Back Up of your PlayBook using your computer and BlackBerry Desktop Software.
This can be downloaded for free from http://us.blackberry.com/apps-software/desktop/
After the Back Up is complete I need you to unplug your PlayBook and then push and hold down the Power Button until the unit Force Powers Off.
Now, while Desktop Software is still open on your computer and the PlayBook Powered Off, Connect the PlayBook to your computer.
You should see and error screen from Desktop Software pop up that has the options to Retry, Update, or Cancel.
QUICKLY choose the Update option.
This will erase all the information off of your PlayBook and Re-Write the Software back onto it. Once it's complete your PlayBook will need to go back through the setup wizard, and you can then perform a restore using Desktop Software to return your information. The only thing that won't come back after the restore are the apps that you downloaded from App World but they can be easily Re-Installed using the My World feature in App World.
Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
BESAdmin's, please make a signature with your BES environment info.
SIM Free BlackBerry Unlocking FAQ
Follow me on Twitter @knottyrope
Want to thank me? Buy my KnottyRope App here
BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V
Maybe you are looking for
-
Windows 7 partition has died. now what?
so ive been running windows 7 in bootcamp with no real issues for a month or so. great. today i try to boot into windows and i get an error report screen saying that some new software or hardware may be causing startup to fail (of course, not specify
-
Unable to get Audit logs for Data Mining Model Oracle11g
Hi All, I followed all the steps given below 2 links but not getting any audit logs. http://download.oracle.com/docs/cd/B28359_01/datamine.111/b28130/install_odm.htm#DMADM024 http://download.oracle.com/docs/cd/B28359_01/datamine.111/b28130/schemaobjs
-
MSAccess Count Field incorrect problem
Hello I am trying an update of Details, I traced the code along to it populated fields and verified values as correct.I am getting an error on the int resultCount = stmt.executeUpdate(); if ( resultCount != 1 ) {Why is this ? My error lin
-
Why can't I send just one song off of an album as a gift?
Why can't I send just one song off of an album as a gift? iPad 2, iOS 7.0.4
-
Graphical screen painter activate 46B
hi i work in SAP 46B version; i don't find graphical screen painter how can i active graphical painter instead of alphanumeric screen painter ? thinks