473,729 Members | 2,348 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB2 and ODBC - Function sequence error

Hi

Recently I did some DB2 and ODBC coding in Visual FoxPro. I bumped on a
problem I cannot resolve.

When I issue a delete statement that deletes no rows (no rows qualify
for the WHERE conditions), DB2 raises SQL0100W warning with
SQLSTATE=02000. The same happens when issuing an insert with select
clause (insert into .... select from ...) when no rows are fetched by
the select clause.

It is normal behaviour for DB2, but it causes me problems when
interacting with DB2 through ODBC. When I issue SQLEXEC routine with one
of the previous statements (delete or insert), I get the following error:
"Connectivi ty error: [Microsoft][ODBC Driver Manager] Function sequence
error"

with an SqlState of S1010. I checked this number - it is an internal
error of ODBC service, not a DB2 one. It means that some odbc calls were
made in wrong order, especially asynchronous ones. But I am not using
asynchronous calls.

I tried setting up IgnoreWarnList CLI variable (both in connection
string and in odbc data source control panel) to include 02000 (it
should prevent DB2 to raise warning 02000 to the client) but it did not
help. I also tried IgnoreWarnings= 1 but it did not help either.

Did anybody ever had similar problems and successfully solved them?

Thanks in advance

--
Szymon Dembek
May 16 '07 #1
4 10079
Szymon Dembek wrote:
Hi

Recently I did some DB2 and ODBC coding in Visual FoxPro. I bumped on a
problem I cannot resolve.

When I issue a delete statement that deletes no rows (no rows qualify
for the WHERE conditions), DB2 raises SQL0100W warning with
SQLSTATE=02000. The same happens when issuing an insert with select
clause (insert into .... select from ...) when no rows are fetched by
the select clause.

It is normal behaviour for DB2, but it causes me problems when
interacting with DB2 through ODBC. When I issue SQLEXEC routine with one
of the previous statements (delete or insert), I get the following error:
"Connectivi ty error: [Microsoft][ODBC Driver Manager] Function sequence
error"

with an SqlState of S1010. I checked this number - it is an internal
error of ODBC service, not a DB2 one. It means that some odbc calls were
made in wrong order, especially asynchronous ones. But I am not using
asynchronous calls.
To me, it looks like a bug in your ODBC driver. Can't you use the CLI
driver that comes with DB2?
I tried setting up IgnoreWarnList CLI variable (both in connection
string and in odbc data source control panel) to include 02000 (it
should prevent DB2 to raise warning 02000 to the client) but it did not
help. I also tried IgnoreWarnings= 1 but it did not help either.
You surely don't want to ignore 02000 because that is the only means to tell
an application that no more rows can be retrieved from a cursor.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
May 16 '07 #2
Szymon Dembek wrote:
Hi

Recently I did some DB2 and ODBC coding in Visual FoxPro. I bumped on
a problem I cannot resolve.

When I issue a delete statement that deletes no rows (no rows qualify
for the WHERE conditions), DB2 raises SQL0100W warning with
SQLSTATE=02000. The same happens when issuing an insert with select
clause (insert into .... select from ...) when no rows are fetched by
the select clause.

It is normal behaviour for DB2, but it causes me problems when
interacting with DB2 through ODBC. When I issue SQLEXEC routine with
one of the previous statements (delete or insert), I get the
following error:
"Connectivi ty error: [Microsoft][ODBC Driver Manager] Function
sequence error"

with an SqlState of S1010. I checked this number - it is an internal
error of ODBC service, not a DB2 one. It means that some odbc calls
were made in wrong order, especially asynchronous ones. But I am not
using asynchronous calls.

I tried setting up IgnoreWarnList CLI variable (both in connection
string and in odbc data source control panel) to include 02000 (it
should prevent DB2 to raise warning 02000 to the client) but it did
not help. I also tried IgnoreWarnings= 1 but it did not help either.

Did anybody ever had similar problems and successfully solved them?
I've seen this error before, though I suspect under different
circumstances (in my case it was due to a query timeout imposed by the
DB2 governor).

In your case, I believe you need to set the CLI variable PATCH1 to 1024
(PATCH1 is a bit-mask parameter so you'll need to add 1024 to any
existing value). This value represents: "MS Visual Basic fix for empty
searched update/delete". You should find it in the same place as you
found IgnoreWarnList.

Incidentally, there's a ton of other "compatibil ity" patches under the
PATCH1 and PATCH2 settings that are worth exploring.
HTH,

Dave.

--

May 16 '07 #3
Dave Hughes wrote:

>
In your case, I believe you need to set the CLI variable PATCH1 to 1024
(PATCH1 is a bit-mask parameter so you'll need to add 1024 to any
existing value). This value represents: "MS Visual Basic fix for empty
searched update/delete". You should find it in the same place as you
found IgnoreWarnList.

Incidentally, there's a ton of other "compatibil ity" patches under the
PATCH1 and PATCH2 settings that are worth exploring.
HTH,

Dave.
Thank you very much!!!

I'll try this configuration variable as soon as possible.

Best regards

--
Szymon
May 17 '07 #4
Knut Stolze wrote:
Szymon Dembek wrote:
>>
It is normal behaviour for DB2, but it causes me problems when
interacting with DB2 through ODBC. When I issue SQLEXEC routine with one
of the previous statements (delete or insert), I get the following error:
"Connectivit y error: [Microsoft][ODBC Driver Manager] Function sequence
error"

with an SqlState of S1010. I checked this number - it is an internal
error of ODBC service, not a DB2 one. It means that some odbc calls were
made in wrong order, especially asynchronous ones. But I am not using
asynchronous calls.

To me, it looks like a bug in your ODBC driver. Can't you use the CLI
driver that comes with DB2?

I'm forced to code in visual fox pro, which means that using odbc is the
easiest way for me.

BTW, I'm using the ODBC driver that came with DB2 client instalation
package. I tried 3 different versions (v8.2, v9)....
>
>I tried setting up IgnoreWarnList CLI variable (both in connection
string and in odbc data source control panel) to include 02000 (it
should prevent DB2 to raise warning 02000 to the client) but it did not
help. I also tried IgnoreWarnings= 1 but it did not help either.

You surely don't want to ignore 02000 because that is the only means to tell
an application that no more rows can be retrieved from a cursor.
You're right, but I tried this only to check if it helps in my case.

Thank you for help.

--
Szymon
May 17 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6774
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used the SQL Profile to watch the T-SQL-Command which Access ( who creates the commands?) creates and noticed:
4
7250
by: Roger Redford | last post by:
Dear Experts, I'm attempting to marry a system to an Oracle 817 datbase. Oracle is my specialty, the back end mainly, so I don't know much about java or javascript. The system uses javascript to make ODBC calls to the db. The particular system I'm working with, will not work with an Oracle stored procedure I'm told. However, it
3
6185
by: Lauren Quantrell | last post by:
Maybe a dumb question - I'm new to ODBC. How do I install an Access ..mde file on a user's workstation and create the ODBC connection to the backend SQL Server database without having to go through the Administrative Tools>Data SOurces (ODBC) menu? IS there a way to do this with VBA code from my installer disk, or by simply copying a file onto the user's PC? Any help is appreciated. LQ
14
10141
by: Abhi | last post by:
FYI: This message is for the benefit of MS Access Community. I found that this prblem has been encounterd by many but there is hardly any place where a complete solution is posted. So I thought I should give back to the community by posting our findings. Thanks you all for all your help till now by posting problems and their solutions. ~Abhijit
5
40407
by: Alec | last post by:
Hi All, I am currently trying to link in Access 97 to a table in a MSSQL 7 server. Initially the link is fine, however, when I close the access database and re-open it from the same network lacation on a different machine, it tells me that the ODBC connection to 'SQL Server Name' failed. How can I create the linked table permenant no matter what machine the networked database is opened on?
2
1531
by: JIM.H. | last post by:
Hello, Here is my function: Private Sub myLiveConn() Dim strConn As String = "Driver={Microsoft Visual FoxPro Driver};UID=;SourceType=DBF;SourceDB=F:\Report Data\appt.dbf;Null=No;Deleted=Yes;Exclusive=No;Connect Timeout=10"
1
1702
by: tommydkat | last post by:
Hi! We've switched from Developer Studio 6.0 to Visual Studio .net 2003. Our application compiles fine with Visual Studio .net 2003 but when it runs, it uses the Microsoft ODBC driver as is shown in this function sequence error we're getting when we issue an UPDATE SQL query to our DB2 database: State:S1010,Native:0,Origin: The IBM ODBC driver is installed. When I go to "Start/Settings/Control Panel/Administrative Tools/Data Sources...
9
2579
by: Greg Strong | last post by:
Hello All, What is the maximum length of an ODBC pass through query? Things work fine with the code except when I try to create a view which is pretty complex in Oracle. I'm using a DSN provided with the Oracle Express Edition and using Access 2k2 as the front-end. When I debug print the SQL and paste it into SQLplus it works fine. The length of the debug print that works is 1988 characters. Since the exact same code works with...
1
5209
by: reliance | last post by:
Using Oracle Migration Workbench, I migrated ms-access 2003 database to oracle 9i. The memo datatype in ms-access mapped to clob datatype in oracle. I have created a system dsn to access oracle tables through ms-access so that the front-end will remain in ms-access. While fetching clob datatype fields - I get ODBC error ODBC--call failed. Function sequence error(#0) System Info : Windows 2003 SP-2 MS-Office 2003 MS-ACCESS 2003 but...
0
8917
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8761
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8148
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2163
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.