MsDb2DataAdapter Error
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
MsDb2DataAdapter Error

 
Post new topic   Reply to topic    Windows Server Forum Index -> Host Integration Server
Author Message
pichamp



Joined: 01 Aug 2005
Posts: 1

Posted: Tue Sep 06, 2005 2:53 pm    Post subject: MsDb2DataAdapter Error Reply with quote

When I try to execute that:

dataAdapter = new Microsoft.HostIntegration.MsDb2Client.MsDb2DataAdapter(sqlCommand);
dataAdapter.Fill(aDataSet);

I have this error :

A SQL error has occurred. Please consult the documentation for your specific DB2 version for a description of the associated Native Error and SQL State. SQLSTATE: 42721, SQLCODE: -725

I think it's because the userid have no the rights to execute the command 'set sql current id'.

If yes, I have a security problem because I have to give admin rights to the user.

Is it possible to desactivate the automatic execution of 'set sql current id"?

What's exactly happens when I do that :
dataAdapter = new Microsoft.HostIntegration.MsDb2Client.MsDb2DataAdapter(sqlCommand);
dataAdapter.Fill(aDataSet);
??
Back to top
View user's profile Send private message
Aaron Grady [MSFT]
Guest





Posted: Mon Sep 12, 2005 8:53 pm    Post subject: Re: MsDb2DataAdapter Error Reply with quote

This error is coming from DB2, so you'd have to look in the DB2 docs to find
out exactly what that code and SQLSTATE mean. Which version of DB2 are you
using?

We attempt to set the current ID if you have filled in the Default Qualifier
parameter of the data provider. I believe if you leave that setting blank we
will not issue this statement, so you can give this a try.

HTH,
--
Aaron Grady
MCSE + Internet, MCDBA, MCSD, MCAD.NET
SNA Server/Host Integration Server
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Back to top
Charles Ezzell (MSFT)
Guest





Posted: Tue Sep 13, 2005 4:54 pm    Post subject: Re: MsDb2DataAdapter Error Reply with quote

I could only find one one instance of this error on the net that details
what the SQLSTATE and SQLCODE are. As Aaron mentioned, look at your docs to
see if this is the same or not. Hope it helps:

Charles

DB2 received a SET statement with an invalid value. Valid SETs might be
allowed or retained. Further processing stops at the named site until the
SET statement is corrected. All SQL statements at the named remote site are
rejected until the SET statement that was in error is corrected. The SET
statement should be reissued with a valid value. This situation can be
corrected with a local SET statement or with a DRDA SET statement executed
at the remote site. Once the special register has been supplied a valid
value, the application can resume execution.
Back to top
nm0reira



Joined: 16 Dec 2005
Posts: 1
Location: Portugal

Posted: Tue Jan 03, 2006 11:01 pm    Post subject: Reply with quote

I've add the same problem but with the tips posted before I solved the problem.

But now I have a diferente problem.

When I execute the select command I get a BIND error. I'm trying to connect to a MVS DB2 database but the DBA rules do'nt permit a normal user to have BIND Privileges.

How can I solve my problem?
Do I real need a user with BIND Privileges?
Back to top
View user's profile Send private message
 
Post new topic   Reply to topic    Windows Server Forum Index -> Host Integration Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB