×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Well, not sure of the reason why but it seems that the update command requires everything that is preceded by @ defined as a parameter. In the UPDATE command, I had

cmdUpdate.CommandText = "UPDATE COHAMIRA.COHMCH01PF SET " & _

"MCHGROUP = @MCHGROUP, MCHID = @MCHID, MCHNAME = @MCHNAME " & _

"WHERE MCHID = @MCHID"

So I defined the three parameters: @MCHGROUP, @MCHID, @MCHNAME. But it seems that the @MCHID in the WHERE section also needs to be added to the parameter collection of the command. I didn't think I needed to do so since I had already defined it. The update is working now but I will have to read more on this to know the reason why that last parameter needs to be added to the collection.

Actually, now that I'm typing this, I just realized that I should remove MCHID = @MCHID from the update part since that is the key to the table and I should not be updating it anyway. Then I should be ok with the three parameters.

Thank you,
 
Antonio Mira
Application Developer - Mid-Ohio Division
Time Warner Cable
1015 Olentangy River Road - 2nd Floor
Columbus, OH 43212
http://www.timewarnercable.com
phone: 614 827 7949 
 


-----Original Message-----
From: systemidotnet-bounces@xxxxxxxxxxxx [mailto:systemidotnet-bounces@xxxxxxxxxxxx] On Behalf Of Walden H. Leverich
Sent: Tuesday, May 12, 2009 1:17 PM
To: .net use with the System i
Subject: Re: [SystemiDotNet] Updating a table on the iSeries...

I think I figured it out...

For the archives... care to share?

-Walden


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.