Showing posts with label updating. Show all posts
Showing posts with label updating. Show all posts

Thursday, March 22, 2012

Error in Updating records using Openquery

Hi,

I am trying to update a DB2 table from Sql Server using Openquery but it gives me an

error, I tried selecting rows from the DB2 table using Openquery and it works fine.

Following is the update query:

UPDATE OPENQUERY(DB2_DB2T, 'SELECT STATUS FROM $ZUDBA01.TPT20_VOLS

WHERE AUD_NBR=10000004 AND POLL_NUM_ACTUAL=''999456789'' AND

REC_TYP=''SYM''') SET STATUS='RETURNED'

This query when executed gives following error:

Server: Msg 7399, Level 16, State 1, Line 35
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: Insufficient base table information for updating or

refreshing.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange:: SetData returned

0x80004005: ].

Kindly help me out.

Thanks and Regards,

Pranjal

I am not sure how much this helps...but check it


http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=113747&SiteID=1

sql

error in updating field thru stor_proc

I'm trying to update 'password' field in a table thru a stored procedure which is called from my program.

I'm passing the values for password and the key fields.

While debugging I can see the values in each parameter, but I get an error that the 'value for password was not passed'.

Here's the program snippet for calling the stored proc.

All three parameters are 'varchar' type

dbConn.Open();

dbConn.CreateParameters(3);

dbConn.AddParameters(0, Pwd, newPwd);

dbConn.AddParameters(1, Login, pwd_Login);

dbConn.AddParameters(2, IdNum, pwd_IdNum);

result = dbMgr.ExecuteNonQuery(CommandType.StoredProcedure, SP_UPDPWD);

--

EXEC @.return_value = [dbo].[usp_UsrMstUpdPwdParaPwdEmailCaseNum]

@.Pwd = N'3Sg7vqowIBRdfgdfgrgdjykFTjTFt5hfHfhFtFghzIG1haWRliBuYW1lPw==',

@.Login = N'xyz@.abc.com',

@.IdNumber = N'00009'

--

What am I missing?

Is Pwd a variable or constant set to "@.Pwd", login to "@.Login", IdNum to "@.IdNum", and "SP_UPDPWD" to the appropriate string for your stored procedure?

Also, is this using an IDBManager pattern?

Thanks,

John

|||

Never mind. found the problem

The parameter for Password was not spelt right!

Sunday, February 26, 2012

Error in Distribution Agent

Hello.
We're running SQL Server 2000.
I've created a transactional publication with queued updating at server
"DATASERVER1" .
When I attempt to push a subscription I receive an error in the Distribution
Agent, as follows:
Server 'DATASERVER1' is not configured for DATA ACCESS
Can anyone tell me what this means? I cannot find anything on MSDN.
Thank you in advance,
Mike
Can you check the value of sp_configure 'remote access' on the subscriber.
Also, please check select @.@.servername to ensure the name is the
netbiosname.
HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Hi, Paul. Thanks for the response.
I ran "sp_configure 'remote access'" and got: minimum=1, maximum=1,
config_value=1, run_value=1.
The name is the NetBios name.
Does it matter that the subscriber and distributor is the same machine?
Thanks again,
Mike
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:uO6qyNGPFHA.1884@.TK2MSFTNGP15.phx.gbl...
> Can you check the value of sp_configure 'remote access' on the subscriber.
> Also, please check select @.@.servername to ensure the name is the
> netbiosname.
> HTH,
> Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Mike,
this is not a problem. Usually it is the other way round - publisher and
distributor on the same box, though - is there a particular reason you are
implementing it this way? As for the message, I'm not sure what the problem
is . Is there connectivity between the servers? Can you open a QA windon
on the publisher and connect to the subscriber ok? What if you try setting
up a linked server on the subscriber to the publisher as a separate test -
do you get the same error?
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)