Click here to Skip to main content
15,920,956 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to create a TableAdapter in a DataSet using the "table Adapter Configuration Wizard" in Visual Studio 2010. I am connecting though ODBC connection[DSN connection], the SQL query runs fine but the fill method is showing error "HY010[ODBC][ORACLE] Function Sequence Error".

But When I am doing same thing using Oracle client connection then it works fine but since its deprecated, i want to use ODBC.

Any help is much appreciated.
Posted

1 solution

There are several possibilities for the error. For example from SQLDisconnect Function[^]
(DM) An asynchronously executing function was called for a StatementHandle associated with the ConnectionHandle and was still executing when SQLDisconnect was called.
(DM) An asynchronously executing function (not this one) was called for the ConnectionHandle and was still executing when this function was called.
(DM) SQLExecute, SQLExecDirect, SQLBulkOperations, or SQLSetPos was called for a StatementHandle associated with the ConnectionHandle and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.

However, I would strongly suggest using Oracle Data Provider for .NET[^] which is supported and constantly updated to understand the new features of Oracle databases.
 
Share this answer
 
Comments
Member 11762295 20-Jul-15 14:30pm    
Actually my code has several classes that are dependent on a Webservice call to connect to the DB and that webservice is using ODBC connection. So I am more inclined on using ODBC connection.
Wendelius 20-Jul-15 14:33pm    
In that case you need to go thoroughly through the code. This error may happen because the code is doing things in wrong order or a wrong handle is used. For example if you commit a transaction which is started in another connection this may occur.

So try to minimize the code path were the error occurs and check that everything is done in correct order.
Member 11762295 20-Jul-15 18:29pm    
The same query works absolutely fine when used with Oracle client ocnnection, only with ODBC connection , the query is throwing this error.
Wendelius 21-Jul-15 0:52am    
Most likely the problem is not in the query but how the ODBC functions are used. Because of this you should investigate that all the ODBC statements (not SQL) are executed correctly and in correct order.
Member 11762295 21-Jul-15 9:38am    
I am really new to this, how do I check the ODBC statements?If they are executed correctly

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900