Microsoft odbc driver manager function sequence error (#0)

System Requirements: Windows 8, Windows 7, Windows 8.1


I'm using the Microsoft- Oracle ODBC Driver to access an Oracle database in MS Access, but on about half of my linked tables, I get a [ Function Sequence Error] whenever I try to pull up the Datasheet view. I've looked around for alternative drivers, but no luck. Does anyone know how to stop getting these function sequence errors? And if I need a new driver, could you provide a link if possible to a download site? Thanks.
The problem During a very simple insert query, using PDO with an ODBC driver for a DB2 database, the driver returns the following error: SQLSTATE[ HY010]: Function sequence error: 0 [ Microsoft][ Driver Manager ODBC] [italian message translation] ( SQLExecute[0] at ext\pdo_odbc\odbc_stmt.c:254) The query itself is a prepared statement insert, with strings and dates. [italian message translation] just says Function sequence error in italian. The research This SO question reports the same problem, but occurred during a SELECT query, which is not my case This PHP bug report reports the same problem, but I've determined that's not my case either. The question Why does a simple insert cause a function sequence error with SQLSTATE[ HY010]?.
The application calls SQLExec Direct to send an SQL statement to the data source. For more information about direct execution, see Direct Execution. The driver modifies the statement to use the form of SQL used by the data source and then submits it to the data source. In particular, the driver modifies the escape sequences used to define certain features in SQL. For the syntax of escape sequences, see Escape Sequences in ODBC. The application can include one or more parameter markers in the SQL statement. To include a parameter marker, the application embeds a question mark (?) into the SQL statement at the appropriate position. For information about parameters, see Statement Parameters. If the SQL statement is a SELECT statement and if the application called SQLSet Cursor Name to associate a cursor with a statement, then the driver uses the specified cursor. Otherwise, the driver generates a cursor name. If the data source is in manual-commit mode (requiring explicit transaction initiation) and a transaction has not already been initiated, the driver initiates a transaction before it sends the SQL statement. For more information, see Manual- Commit Mode. If an application uses SQLExec Direct to submit a COMMIT or ROLLBACK statement, it will not be interoperable between DBMS products. To commit or roll back a transaction, an application calls SQLEnd Tran. If SQLExec Direct encounters a data-at-execution parameter, it returns SQL_ NEED_ DATA. The application sends the data using SQLParam Data and SQLPut Data. See SQLBind Parameter, SQLParam Data, SQLPut Data, and Sending Long Data. If SQLExec Direct executes a searched update, insert, or delete statement that does not affect any rows at the data source, the call to SQLExec Direct returns SQL_ NO_ DATA. If the value of the SQL_ ATTR_ PARAMSET_ SIZE statement attribute is greater than 1 and the SQL statement contains at least one parameter marker.
Huzefa Zohaib Ranch Hand Posts: 40 posted 12 years ago The following Exception java.sql. SQLException: [ Microsoft][ ODBC Driver Manager] Function sequence error is occuring on the following code. What does this error means and why is occuring. Joe Ess Bartender Posts: 9230 9 posted 12 years ago What the function sequence error means is that the sequence of opening a statement, initalizing a result set, reading the result set (most often from beginning to end, from left to right) and releasing resources has not been performed in the proper order. I've seen this exception when someone tries to read from a result set before calling rs.next. [/qb]


This may be the offending code. Closing the statement also may release the result set. However, you should not rely on it and close both after you are finished with them. [ October 06, 2003: Message edited by: Joe Ess ].
A connection string has the following syntax:connection-string := empty-string[;] | attribute[;] | attribute; connection-stringempty-string :=attribute := attribute-keyword=attribute-value | DRIVER=[ ]attribute-value[ ]attribute-keyword := DSN | UID | PWD | driver-defined-attribute-keywordattribute-value := character-stringdriver-defined-attribute-keyword := identifierwhere character-string has zero or more characters; identifier has one or more characters; attribute-keyword is not case-sensitive; attribute-value may be case-sensitive; and the value of the DSN keyword does not consist solely of blanks. Because of connection string and initialization file grammar, keywords and attribute values that contain the characters []?*=!@ not enclosed with braces should be avoided. The value of the DSN keyword cannot consist only of blanks and should not contain leading blanks. Because of the grammar of the system information, keywords and data source names cannot contain the backslash (\) character. Applications do not have to add braces around the attribute value after the DRIVER keyword unless the attribute contains a semicolon in which case the braces are required. If the attribute value that the driver receives includes braces, the driver should not remove them but they should be part of the returned connection string. A DSN or connection string value enclosed with braces ( ) containing any of the characters []?*=!@ is passed intact to the driver. However, when using these characters in a keyword, the Driver Manager returns an error when working with file DSNs but passes the connection string to the driver for regular connection strings. Avoid using embedded braces in a keyword value. The connection string may include any number of driver-defined keywords. Because the DRIVER keyword does not use information from the system information, the driver must.
 This topic discusses SQLSTATE values for ODBC 3.x. For more information on ODBC 3.x SQLSTATE values, see SQLSTATE Mappings. SQLGet Diag Rec or SQLGet Diag Field returns SQLSTATE values as defined by Open Group Data Management: Structured Query Language ( SQL Version 2 ( March 1995). SQLSTATE values are strings that contain five characters. The following table lists SQLSTATE values that a driver can return for SQLGet Diag Rec. The character string value returned for an SQLSTATE consists of a two-character class value followed by a three-character subclass value. A class value of 01 indicates a warning and is accompanied by a return code of SQL_ SUCCESS_ WITH_ INFO. Class values other than 01, except for the class IM, indicate an error and are accompanied by a return value of SQL_ ERROR. The class IM is specific to warnings and errors that derive from the implementation of ODBC itself. The subclass value 000 in any class indicates that there is no subclass for that SQLSTATE. The assignment of class and subclass values is defined by SQL-92. Note Although successful execution of a function is normally indicated by a return value of SQL_ SUCCESS, the SQLSTATE 00000 also indicates success. SQLSTATEError Can be returned from01000 General warning All ODBC functions except: SQLError SQLGet Diag Field SQLGet Diag Rec01001 Cursor operation conflict SQLExec Direct SQLExecute SQLParam Data SQLSet Pos01002 Disconnect error SQLDisconnect01003 NULL value eliminated in set function SQLExec Direct SQLExecute SQLParam Data01004 String data, right-truncated SQLBrowse Connect SQLBulk Operations SQLCol Attribute SQLData Sources SQLDescribe Col SQLDriver Connect SQLDrivers SQLExec Direct SQLExecute SQLExtended Fetch SQLFetch SQLFetch Scroll SQLGet Connect Attr SQLGet Cursor Name SQLGet Data SQLGet Desc Field SQLGet Desc Rec SQLGet Env Attr SQLGet Info SQLGet Stmt Attr SQLNative Sql SQLParam Data SQLPut Data SQLSet Cursor Name01006 Privilege not.