Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's a pcbvalue?

Status
Not open for further replies.

bigfoot

Programmer
May 4, 1999
1,779
US
I am writing from .net to my AS/400, and it's giving me an error Invalid value stored in pcbvalue.

The database is on the AS/400, and it's a native OS400 DB2.
I get this on an update.
 
I think that this is some sort of an ODBC error, where possibly the parameters passed to ODBC, or the query are incorrect.Have you got any further error messages or diagnostics?
Marc
 
Yes, there is a whole dialog of stuff.

I'll post it.
 
This pcbvalue problem is driving me nuts.

Here's the whole message.

System.Data.Odbc.OdbcException: ERROR [HY090] [IBM][Client Access Express ODBC Driver (32-bit)][DB2/400 SQL]Invalid value stored in pcbValue.
at System.Data.Odbc.OdbcConnection.HandleError(HandleRef hrHandle, SQL_HANDLE hType, RETCODE retcode)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method)
at System.Data.Odbc.OdbcCommand.ExecuteNonQuery()
at ProrgamMaint.modMain.SaveProgramItems(Int32& iRowsAffected) in C:\Source\@DotNet\ProrgamMaint\modMain.vb:line 927


I'm getting this on an insert.
It's so cryptic.
 
I saw that. It's in another thread too.

I think I'm almost there.

I need a good example of how to update a file on my AS/400 from CV.NET.
 
I tried what Cliffe did in the post but that did not work.

I tried emailing him, but it came back undeliverable.
 
Sorry bigfoot, but you're really outside my scope of experience. The only thing that springs to mind, from everything I've seen and read, is that either:

a) Your ODBC parms when attempting the update are somehow wrong
b) You're not populating all the fields when updating

If I was you, I would try adding as many diagnostics as possible, and display all fields that are to be updated just prior to the call. You might want to try replacing the update with a straight select. If you have any logging facilities, turn them on, and if possible pause execution just prior to the ODBC call, so that you can see better what is occurring.

Sorry that I can't be more help

Marc
 
Bigfoot,
I've just read your other post about VB.NET and AS400. Does one of the update fields contain an apostrophy?
Marc
 
That's why I needed parms because of apostrophys.

I got in touch with IBM. It seems that the .NET environment requires an updated ODBC driver. M$ has one too in their downloads page. Just search for .net and odbc. Then you must include it in your project and use Microsoft.Data.Odbc and not System.Data.Odbc.

I'll have more info as soon as I get back to work on Monday. I just might have it working. I created a small test project that worked fine.

Thanks

Gary
 
Don't you just hate that!!!

Hope it works out. Let us know.

Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top