×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I tried changing my Select statement to include CHAR() around the field
in question, but that didn't work, or I got the syntax wrong, because
then I got the Object Reference Not Set error when I attempted to
reference the field - so the field was never defined.
I have also since discovered that the problem is not limited to this one
field. I have tested several different files, and I seem to get the
same error on most alpha fields, but not all.
I am thinking now that it is an incompatibility between my client and
the i5 - I am running the V5R4 version of iSeries Access, and thus the
DB2 .Net data provider, but my i5 is still at V5R3 for the time being.
I'll do my best to get the upgrade scheduled and completed so that I can
test that theory.
-----Original Message-----
From: systemidotnet-bounces@xxxxxxxxxxxx
[mailto:systemidotnet-bounces@xxxxxxxxxxxx] On Behalf Of Elvis Budimlic
Sent: Thursday, May 01, 2008 11:46 AM
To: '.net use with the System i'
Subject: Re: [SystemiDotNet] DataGridView field error
What you deduced makes sense. One thing that's not clear is if you've
hardcoded the columns being returned or just let the DataGridView
dynamically create them (usual case). If you've hardcoded the columns,
you
ought to be able to change them then.
If it is dynamic and it's the issue with the DataGridView
misinterpreting
the data type (shouldn't do that, but...), perhaps you can change your
SQL
SELECT statement to explicitly cast that column to character (i.e.
CHAR(myColumn)).
I wish I knew more about .net to give you some .net type options but I'm
still learning as well.
HTH, Elvis
Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com
-----Original Message-----
Subject: [SystemiDotNet] DataGridView field error
I have a small test app that I've been playing with, learning how to
connect and pull data from my i5. Good news is I got it working
perfectly. Bad news is I changed the input file and now it's not
working.
The file that I have changed to is a JD Edwards file that has the
Business Unit field in it. This is a very common field in JDE, and a
little strange. It's a 12 digit character field, but almost always has
a right-justified numeric value in it.
I am including this field in my grid, along with the Item number and
Quantity on hand. When the grid loads, I see a red 'X' for the Business
Unit and I get the following error:
I have no idea what this means, but I assume it means that VB is
assuming that this field is numeric, but then crashing when it finds
there is non-numeric data in the field (blanks). The other two fields
show up fine.
How do I resolve this error? Is there a specific property I need to set
on the column to force a character data type?
Thanks
Bob Cagle
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.